PowerNukkit / Java2Nukkit-World-Converter

Converts worlds from Minecraft 1.15.2+ Java Edition to the newest Nukkit MCA file format
MIT License
23 stars 6 forks source link

"NoSuchElementException:" error when converting a Java 1.15.2 world #93

Open siebsie23 opened 4 years ago

siebsie23 commented 4 years ago

Affected Version v3.0.0

Describe the bug When converting a 1.15.2 world I get a "NoSuchElementException: type" error. When loading this world into Nukkit it only generated a small part of the map.

To Reproduce Steps to reproduce the behavior:

  1. Convert a normal 1.15.2 world to Nukkit using Java2Nukkit.
  2. Error.

Exception stack trace If applicable, paste it below to help explain your problem.

java.util.NoSuchElementException: type
        at br.com.gamemods.nbtmanipulator.NbtCompound.require(nbt.kt:452)
        at br.com.gamemods.nbtmanipulator.NbtCompound.getString(nbt.kt:510)
        at br.com.gamemods.j2nwc.internal.Block_converterKt.toNukkit(block-converter.kt:59)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt.toNukkit(chunk-converter.kt:116)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt$toNukkit$nukkitSections$2.invoke(chunk-converter.kt:31)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt$toNukkit$nukkitSections$2.invoke(chunk-converter.kt)
        at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:172)
        at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:132)
        at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:156)
        at kotlin.collections.MapsKt__MapsKt.putAll(Maps.kt:374)
        at kotlin.collections.MapsKt__MapsKt.toMap(Maps.kt:542)
        at kotlin.collections.MapsKt__MapsKt.toMap(Maps.kt:536)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt.toNukkit(chunk-converter.kt:35)
        at br.com.gamemods.j2nwc.internal.RegionFileConverter.toNukkit(RegionFileConverter.kt:39)
        at br.com.gamemods.j2nwc.internal.RegionFileConverter.convertRegionFile(RegionFileConverter.kt:19)
        at br.com.gamemods.j2nwc.WorldConverter.convert(WorldConverter.kt:105)
        at br.com.gamemods.j2nwc.WorldConverterCLI.main(WorldConverterCLI.kt:83)
AntonPPDS commented 4 years ago

The same issue

pineapplebox commented 4 years ago

bump

thefrostyhalf commented 4 years ago

Bump again, has anyone found a reason for this error or workaround?

suerion commented 4 years ago

we had the same problem

but other block converts


java.util.NoSuchElementException: type
        at br.com.gamemods.nbtmanipulator.NbtCompound.require(nbt.kt:452)
        at br.com.gamemods.nbtmanipulator.NbtCompound.getString(nbt.kt:510)
        at br.com.gamemods.j2nwc.internal.Block_converterKt.toNukkit(block-converter.kt:72)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt.toNukkit(chunk-converter.kt:118)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt$toNukkit$nukkitSections$2.invoke(chunk-converter.kt:31)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt$toNukkit$nukkitSections$2.invoke(chunk-converter.kt)
        at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:172)
        at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:132)
        at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:156)
        at kotlin.collections.MapsKt__MapsKt.putAll(Maps.kt:374)
        at kotlin.collections.MapsKt__MapsKt.toMap(Maps.kt:542)
        at kotlin.collections.MapsKt__MapsKt.toMap(Maps.kt:536)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt.toNukkit(chunk-converter.kt:35)
        at br.com.gamemods.j2nwc.internal.RegionFileConverter.toNukkit(RegionFileConverter.kt:42)
        at br.com.gamemods.j2nwc.internal.RegionFileConverter.convertRegionFile(RegionFileConverter.kt:20)
        at br.com.gamemods.j2nwc.WorldConverter.convert(WorldConverter.kt:108)
        at br.com.gamemods.j2nwc.WorldConverterCLI.main(WorldConverterCLI.kt:107)```
thefrostyhalf commented 4 years ago

A few things we have found that will cause this error:

suerion commented 4 years ago

A few things we have found that will cause this error:

  • User-created maps
  • Chests
  • Maybe wheat (still not sure)
  • Maybe beds (also not sure)

Wa has already the chests, but it does not work, do replace it, the nbt is already there,

It could be some other things, we found not other solutions.

suerion commented 4 years ago

Hey @thefrostyhalf @pineapplebox @joserobjr @AntonPPDS @siebsie23

our dev had implemented an debug, the block and the cord would be seen

Java2Nukkit-World-Converter-3.2.2-SNAPSHOT-cli.zip

Please, try it with this,

we thougt, the converter, convert not the blocks to the right ones -> barrels to chest, seagrass to water and so on

suerion commented 4 years ago

Oke new debug update

Java2Nukkit-World-Converter-3.2.3-SNAPSHOT-cli.zip


error in block -33,65,-137: minecraft:barrel | props = br.com.gamemods.nbtmanipulator.NbtCompound@90f6bfd
An error has occurred while converting the world!
java.util.NoSuchElementException: type
        at br.com.gamemods.nbtmanipulator.NbtCompound.require(nbt.kt:452)
        at br.com.gamemods.nbtmanipulator.NbtCompound.getString(nbt.kt:510)
        at br.com.gamemods.j2nwc.internal.Block_converterKt.toNukkit(block-converter.kt:74)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt.toNukkit(chunk-converter.kt:118)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt$toNukkit$nukkitSections$2.invoke(chunk-converter.kt:31)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt$toNukkit$nukkitSections$2.invoke(chunk-converter.kt)
        at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:172)
        at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:132)
        at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:156)
        at kotlin.collections.MapsKt__MapsKt.putAll(Maps.kt:374)
        at kotlin.collections.MapsKt__MapsKt.toMap(Maps.kt:542)
        at kotlin.collections.MapsKt__MapsKt.toMap(Maps.kt:536)
        at br.com.gamemods.j2nwc.internal.Chunk_converterKt.toNukkit(chunk-converter.kt:35)
        at br.com.gamemods.j2nwc.internal.RegionFileConverter.toNukkit(RegionFileConverter.kt:42)
        at br.com.gamemods.j2nwc.internal.RegionFileConverter.convertRegionFile(RegionFileConverter.kt:20)
        at br.com.gamemods.j2nwc.WorldConverter.convert(WorldConverter.kt:108)
        at br.com.gamemods.j2nwc.WorldConverterCLI.main(WorldConverterCLI.kt:107)
The world conversion has failed
suerion commented 4 years ago

so we had also added the waterlogged debug -> please add this in future in the converter, it would be easier @joserobjr

Java2Nukkit-World-Converter-3.2.5-SNAPSHOT-cli.zip debug