CubicChunks

CubicChunks

840k Downloads

Not yet loaded cubes launch NPE in attempt to set block in them.

Foghrye4 opened this issue ยท 6 comments

commented

Long story short, player stuck in unloaded cube, tried to place a block in it and catches exception.

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraft.world.chunk.Chunk.setEBS_CubicChunks(Chunk.java:1757)
	at net.minecraft.world.chunk.Chunk.redirect$setBlockState_CubicChunks_EBSSetRedirect$zzj000(Chunk.java:2010)
	at net.minecraft.world.chunk.Chunk.func_177436_a(Chunk.java:556)
	at net.minecraft.world.World.func_180501_a(World.java:342)
	at net.minecraft.item.ItemBlock.placeBlockAt(ItemBlock.java:180)
	at net.minecraft.item.ItemBlock.func_180614_a(ItemBlock.java:54)
	at net.minecraft.item.ItemStack.func_179546_a(ItemStack.java:187)
	at net.minecraft.client.multiplayer.PlayerControllerMP.func_187099_a(PlayerControllerMP.java:466)
	at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1577)
	at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:2252)
	at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2018)

Would be appropriate fix to load missing cube synchronously whenever player reach it or tried to place block in it?

commented

You can't load a cube clientside. What should be done is that setBlockState should do nothing in that case (but only clientside).

commented

Yes, you are right. Also a shivering near a border reminds me a way when player collided with blocks server side only.
Could it be that network thread overflowed with tasks and cube packet does not reach client in time due to that?
How I can check amount of tasks in network?

commented

I think this is some failure in PlayerCubeMap. I even thing I know what causes it. Unload packets also should be queued the same way as chunk data packets.

commented

cubesToSend field from PlayerCubeMap should be a List of CubeWatchers?
Oh, nevermind. I was confused by //unload commentary.

commented

Is this still an issue?

commented

Closing as it has never been confirmed to occur again.