Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
siebsie23 opened this issue Mar 16, 2020 · 9 comments
Open
Assignees
Labels
Type: bug Something isn't working

Comments

@siebsie23
Copy link

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)
@siebsie23 siebsie23 added the Type: bug Something isn't working label Mar 16, 2020
@joserobjr joserobjr self-assigned this Mar 17, 2020
@AntonPPDS
Copy link

The same issue

@pineapplebox
Copy link

bump

@thefrostyhalf
Copy link

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

@suerion
Copy link

suerion commented Jul 14, 2020

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
Copy link

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)

@suerion
Copy link

suerion commented Jul 15, 2020

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
Copy link

suerion commented Jul 16, 2020

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
Copy link

suerion commented Jul 17, 2020

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
Copy link

suerion commented Jul 19, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants