mircokroon / minecraft-world-downloader

Download Minecraft worlds, extend server's render distance. 1.12.2 - 1.21
GNU General Public License v3.0
1.25k stars 84 forks source link

Getting an error when trying to start download, after connecting to localhost:25565 #614

Closed Arktikus closed 2 weeks ago

Arktikus commented 1 year ago

Describe the bug When trying to download the world I get following error.

Steps to reproduce Set the program up, connect to localhost:25565 and get the error

Log output

java.lang.ArrayIndexOutOfBoundsException: Index 19632 out of bounds for length 19632
    at packets.DataTypeProvider.readNext(DataTypeProvider.java:76)
    at packets.DataTypeProvider$1.read(DataTypeProvider.java:198)
    at java.base/java.io.InputStream.read(InputStream.java:293)
    at java.base/java.io.DataInputStream.readFully(DataInputStream.java:201)
    at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:614)
    at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:570)
    at se.llbit.nbt.StringTag.read(StringTag.java:46)
    at se.llbit.nbt.NamedTag.read(NamedTag.java:58)
    at packets.DataTypeProvider.readNbtTag(DataTypeProvider.java:195)
    at packets.handler.version.ClientBoundGamePacketHandler_1_18.lambda$new$1(ClientBoundGamePacketHandler_1_18.java:32)
    at packets.handler.PacketHandler.handle(PacketHandler.java:57)
    at packets.DataReader.readPackets(DataReader.java:163)
    at packets.DataReader.pushData(DataReader.java:118)
    at proxy.ProxyServer.lambda$run$7(ProxyServer.java:106)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.lambda$run$9(ProxyServer.java:103)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.run(ProxyServer.java:62)

 java.lang.RuntimeException: Invalid VarInt found! Packet structure may have changed.
    at packets.DataReader.readVarInt(DataReader.java:70)
    at packets.DataTypeProvider.readVarInt(DataTypeProvider.java:111)
    at game.data.entity.EntityRegistry.destroyEntities(EntityRegistry.java:187)

 java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 17 out of bounds for byte[10]

 java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 17 out of bounds for byte[10]

 java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 17 out of bounds for byte[10]

 java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 17 out of bounds for byte[10]
    at java.base/java.lang.System.arraycopy(Native Method)
    at packets.DataTypeProvider.readByteArray(DataTypeProvider.java:90)
    at packets.DataTypeProvider.readDouble(DataTypeProvider.java:216)
    at packets.handler.ServerBoundGamePacketHandler.lambda$new$0(ServerBoundGamePacketHandler.java:20)
    at packets.handler.PacketHandler.handle(PacketHandler.java:57)
    at packets.DataReader.readPackets(DataReader.java:163)
    at packets.DataReader.pushData(DataReader.java:118)
    at proxy.ProxyServer.lambda$run$4(ProxyServer.java:86)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.lambda$run$6(ProxyServer.java:83)
    at java.base/java.lang.Thread.run(Thread.java:833)

 java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1

 java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at game.data.dimension.DimensionCodec.readDimensions(DimensionCodec.java:84)
    at game.data.dimension.DimensionCodec.fromNbt(DimensionCodec.java:69)
    at packets.handler.version.ClientBoundGamePacketHandler_1_19.lambda$new$0(ClientBoundGamePacketHandler_1_19.java:38)
    at packets.handler.PacketHandler.handle(PacketHandler.java:57)
    at packets.DataReader.readPackets(DataReader.java:163)
    at packets.DataReader.pushData(DataReader.java:118)
    at proxy.ProxyServer.lambda$run$7(ProxyServer.java:106)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.lambda$run$9(ProxyServer.java:103)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.run(ProxyServer.java:62)

 java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at game.data.dimension.DimensionCodec.readDimensions(DimensionCodec.java:84)
    at game.data.dimension.DimensionCodec.fromNbt(DimensionCodec.java:69)
    at packets.handler.version.ClientBoundGamePacketHandler_1_19.lambda$new$0(ClientBoundGamePacketHandler_1_19.java:38)
    at packets.handler.PacketHandler.handle(PacketHandler.java:57)
    at packets.DataReader.readPackets(DataReader.java:163)
    at packets.DataReader.pushData(DataReader.java:118)
    at proxy.ProxyServer.lambda$run$7(ProxyServer.java:106)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.lambda$run$9(ProxyServer.java:103)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.run(ProxyServer.java:62)

 java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at game.data.dimension.DimensionCodec.readDimensions(DimensionCodec.java:84)
    at game.data.dimension.DimensionCodec.fromNbt(DimensionCodec.java:69)
    at packets.handler.version.ClientBoundGamePacketHandler_1_19.lambda$new$0(ClientBoundGamePacketHandler_1_19.java:38)
    at packets.handler.PacketHandler.handle(PacketHandler.java:57)
    at packets.DataReader.readPackets(DataReader.java:163)

 java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at game.data.dimension.DimensionCodec.readDimensions(DimensionCodec.java:84)

 java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at game.data.dimension.DimensionCodec.readDimensions(DimensionCodec.java:84)

 java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at game.data.dimension.DimensionCodec.readDimensions(DimensionCodec.java:84)
    at game.data.dimension.DimensionCodec.fromNbt(DimensionCodec.java:69)
    at packets.handler.version.ClientBoundGamePacketHandler_1_19.lambda$new$0(ClientBoundGamePacketHandler_1_19.java:38)
    at packets.handler.PacketHandler.handle(PacketHandler.java:57)
    at packets.DataReader.readPackets(DataReader.java:163)
    at packets.DataReader.pushData(DataReader.java:118)
    at proxy.ProxyServer.lambda$run$7(ProxyServer.java:106)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.lambda$run$9(ProxyServer.java:103)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.run(ProxyServer.java:62)

 java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at game.data.dimension.DimensionCodec.readDimensions(DimensionCodec.java:84)
    at game.data.dimension.DimensionCodec.fromNbt(DimensionCodec.java:69)
    at packets.handler.version.ClientBoundGamePacketHandler_1_19.lambda$new$0(ClientBoundGamePacketHandler_1_19.java:38)
    at packets.handler.PacketHandler.handle(PacketHandler.java:57)
    at packets.DataReader.readPackets(DataReader.java:163)

 java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
    at game.data.dimension.DimensionCodec.readDimensions(DimensionCodec.java:84)
    at game.data.dimension.DimensionCodec.fromNbt(DimensionCodec.java:69)
    at packets.handler.version.ClientBoundGamePacketHandler_1_19.lambda$new$0(ClientBoundGamePacketHandler_1_19.java:38)
    at packets.handler.PacketHandler.handle(PacketHandler.java:57)
    at packets.DataReader.readPackets(DataReader.java:163)
    at packets.DataReader.pushData(DataReader.java:118)
    at proxy.ProxyServer.lambda$run$7(ProxyServer.java:106)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.lambda$run$9(ProxyServer.java:103)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at proxy.ProxyServer.run(ProxyServer.java:62)

 java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 12 out of bounds for byte[5]
    at java.base/java.lang.System.arraycopy(Native Method)
    at packets.DataTypeProvider.readByteArray(DataTypeProvider.java:90)
    at packets.DataTypeProvider.readLong(DataTypeProvider.java:155)
    at packets.DataTypeProvider.readUUID(DataTypeProvider.java:224)
    at game.data.entity.PlayerEntity.parse(PlayerEntity.java:22)
    at game.data.entity.EntityRegistry.lambda$addPlayer$6(EntityRegistry.java:88)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:22)
    at game.data.entity.EntityRegistry.lambda$addPlayer$7(EntityRegistry.java:86)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)

 java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 12 out of bounds for byte[5]
    at java.base/java.lang.System.arraycopy(Native Method)

 java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 17 out of bounds for byte[9]

    at packets.DataTypeProvider.readNext(DataTypeProvider.java:76)
    at packets.DataTypeProvider$1.read(DataTypeProvider.java:198)
    at java.base/java.io.DataInputStream.readByte(DataInputStream.java:271)
    at se.llbit.nbt.NamedTag.read(NamedTag.java:54)
    at packets.DataTypeProvider.readNbtTag(DataTypeProvider.java:195)
    at game.data.chunk.version.Chunk_1_14.parseHeightMaps(Chunk_1_14.java:62)
    at game.data.chunk.version.Chunk_1_18.parse(Chunk_1_18.java:49)

 java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 12 out of bounds for byte[5]
    at java.base/java.lang.System.arraycopy(Native Method)
    at packets.DataTypeProvider.readByteArray(DataTypeProvider.java:90)
    at packets.DataTypeProvider.readLong(DataTypeProvider.java:155)
    at packets.DataTypeProvider.readUUID(DataTypeProvider.java:224)
    at game.data.entity.PlayerEntity.parse(PlayerEntity.java:22)
    at game.data.entity.EntityRegistry.lambda$addPlayer$6(EntityRegistry.java:88)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:12)
    at util.ExceptionHandling.attempt(ExceptionHandling.java:22)
    at game.data.entity.EntityRegistry.lambda$addPlayer$7(EntityRegistry.java:86)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
...

Screenshots grafik

Version

BigChuro commented 1 year ago

I'm having the same issue, with the same error. Even tried using older releases and same thing happens. Using Minecraft version 1.20.2

Cartervj commented 1 year ago

Same

froggygroggy commented 1 year ago

ive been having this problem for a while, please let me know if you find a fix! ive tried everything. it works for me in older versions of minecraft but unfortunately the server i want to save my world from is only 1.20.

febrance commented 1 year ago

Guys, Minecrafts Server protocol (Especially the chunk protocol) was modified in 1.20.2. You can use 1.20 and 1.20.1 no problems but 1.20.2 has some optimizations for low bandwidth machines, it will now send the chunks in small batches and not a huge batch of chunk data. Thats why this Tool cant read new 1.20.2 Packets properly and gets this out of bounds error.

ghost commented 9 months ago

Guys, Minecrafts Server protocol (Especially the chunk protocol) was modified in 1.20.2. You can use 1.20 and 1.20.1 no problems but 1.20.2 has some optimizations for low bandwidth machines, it will now send the chunks in small batches and not a huge batch of chunk data. Thats why this Tool cant read new 1.20.2 Packets properly and gets this out of bounds error.

How