gomint / gomint

GoMint is a modern Minecraft Bedrock Edition server enabling you to make your visions come true
https://gomint.io/
Other
241 stars 31 forks source link

[a5ebb3] GoMint: io.gomint.server.network.PlayerConnection.sendWorldInitialization, io.gomint.server.entity.EntityPlayer.prep... #736

Closed GoMinty closed 3 years ago

GoMinty commented 3 years ago
New error: [GoMint]
1 occurrence since (Fri Nov 15 2019 11:27:39)
ApplicationGoMint
Attributes version — 1
  • s:32c8d1d5 — 1

tag.plugin.crash — 1
  • 1 — 1

plugin — 1
  • Portal v1.0 — 1

Classifiers java.lang.NullPointerException
Frames io.gomint.server.network.PlayerConnection.sendWorldInitialization io.gomint.server.entity.EntityPlayer.prepareEntity io.gomint.server.network.handler.PacketResourcePackResponseHandler.switchToLogin io.gomint.server.network.handler.PacketResourcePackResponseHandler.handle io.gomint.server.network.PlayerConnection.handlePacket io.gomint.server.network.PlayerConnection.handleBufferData io.gomint.server.network.PlayerConnection.handleSocketData io.gomint.server.network.PlayerConnection.updateNetwork io.gomint.server.network.PlayerConnection.update io.gomint.server.network.NetworkManager.update io.gomint.server.GoMintServer.startAfterRegistryInit io.gomint.server.Bootstrap.bootstrap io.gomint.server.Bootstrap.main
geNAZt commented 3 years ago

Invalid biome ID failure, need to check where those biome ID comes from

VixikHD commented 3 years ago

obrazek console

fl3x1324 commented 3 years ago

It comes from here: when a player joins for the first time the spawnLocation for the player is null in this piece of code: io.gomint.server.network.PlayerConnection#sendWorldInitialization, so the world spawn is used. In my case the problem is that the world spawn is 150, 75, 150. When calling world.getBiome(position) in io.gomint.server.world.WorldAdapter#getBiome the block coordinates are converted to chunk ones, resulting in 9, 9 for chunk x and chunk z. Then after the chunk is created with the chunk coordinates and generate=true, when getting the biome with chunk.biome(150 & 15, 150 & 15) we end up with chunk.biome(6, 6). In that method the biome ID is generated by shifting 6 four times to the left and adding 6 to it, both x and z are 6. The result is 96 + 6 = 102. When calling getByte on this.biomes in ChunkAdapter the ID turns out to be 119. There's no biome with such ID in the Biomes enum.