Tropicraft

Tropicraft

9M Downloads

Bug report in Volleyball - NPE resulting in server crash

radfast opened this issue ยท 2 comments

commented

This is in:
tropicraftmod{v5.1.6 for MC 1.6.4} [Tropicraft](tropicraft v5.1.6 Mod for MC v1.6.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
volleyballmod{v5.1.6 for MC 1.6.4} [Volleyball](tropicraft v5.1.6 Mod for MC v1.6.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

java.lang.NullPointerException
at tropicraft.volleyball.TileEntityCourtMaster.func_70310_b(TileEntityCourtMaster.java:56)
at tropicraft.volleyball.TileEntityCourtMaster.func_70319_e(TileEntityCourtMaster.java:104)
at net.minecraft.server.management.PlayerInstance.func_73257_a(PlayerInstance.java:254)
at net.minecraft.server.management.PlayerInstance.func_73254_a(PlayerInstance.java:196)
at net.minecraft.server.management.PlayerManager.func_72693_b(PlayerManager.java:101)
at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:444)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:876)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:330)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:781)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:663)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

commented

I think the crash is because there is a TileEntityCourtMaster which has no court. Maybe the Court Master block was placed in the world by somebody in creative mode or using worldedit? The problem could be fixed by initialising every TileEntityCourtMaster with a dummy court.

Like this:
[code]
Court court = new Court();
court.minX = xCoord;
court.minZ = zCoord;
court.maxX = xCoord;
court.maxZ = zCoord;
court.zLength = 1.0D;
court.xLength = 1.0D;
court.y = yCoord;
[/code]

commented

Yep that's my bad. I left the old volleyball code in there even though I never finished implementing it. Removed it in the latest code base and will be fixed in the upcoming release! Thanks!