Crash on Sponge when placing bucket
SquidDev opened this issue ยท 2 comments
Useful information to include:
- Minecraft version: 1.12.2
- SpongeForge 1.12.2 2825-7.1.7-RC3768
- CC: Tweaked version: 1.86.0
- Place down a bucket of water from a turtle, receive the following crash:
[12:06:33] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking block entity
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:773) ~[MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) ~[nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
Caused by: java.lang.AbstractMethodError: dan200.computercraft.shared.util.FakeNetHandler.getLastTryBlockPacketTimeStamp()J
at net.minecraftforge.common.ForgeHooks.handler$onItemRightClickHead$bdd000(ForgeHooks.java:1692) ~[ForgeHooks.class:?]
at net.minecraftforge.common.ForgeHooks.onItemRightClick(ForgeHooks.java) ~[ForgeHooks.class:?]
at dan200.computercraft.shared.turtle.core.TurtlePlaceCommand.deployOnBlock(TurtlePlaceCommand.java:373) ~[TurtlePlaceCommand.class:?]
at dan200.computercraft.shared.turtle.core.TurtlePlaceCommand.deploy(TurtlePlaceCommand.java:131) ~[TurtlePlaceCommand.class:?]
at dan200.computercraft.shared.turtle.core.TurtlePlaceCommand.execute(TurtlePlaceCommand.java:82) ~[TurtlePlaceCommand.class:?]
at dan200.computercraft.shared.turtle.core.TurtleBrain.updateCommands(TurtleBrain.java:889) ~[TurtleBrain.class:?]
at dan200.computercraft.shared.turtle.core.TurtleBrain.update(TurtleBrain.java:123) ~[TurtleBrain.class:?]
at dan200.computercraft.shared.turtle.blocks.TileTurtle.func_73660_a(TileTurtle.java:218) ~[TileTurtle.class:?]
at org.spongepowered.common.event.tracking.TrackingUtil.tickTileEntity(TrackingUtil.java:257) ~[spongeforge-1.12.2-2825-7.1.7-RC3768.jar:1.12.2-2825-7.1.7-RC3768]
at net.minecraft.world.WorldServer.updateTileEntity(WorldServer.java:3167) ~[oo.class:?]
at net.minecraft.world.WorldServer.redirect$onUpdateTileEntities$zme000(WorldServer.java:3151) ~[oo.class:?]
at net.minecraft.world.World.func_72939_s(World.java:6847) ~[amu.class:?]
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:2290) ~[oo.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767) ~[MinecraftServer.class:?]
... 4 more
This is caused by this modification to Forge's classes. From what I can tell, there's two problems here:
- There's no null check on the connection, so older versions of CC:T will also crash it.
- If the connection is present, it's not guaranteed to be an instance of
NetHandlerPlayServerBridge
.
The simple bodge on our end would be to inline ForgeHooks.onItemRightClick
or to implement bridge$getLastTryBlockPacketTimeStamp
on our network connection. However, we should report this to Sponge and hopefully get it fixed there instead.
Reported at SpongePowered/SpongeForge#3060. Will track progress there instead.
I accidentally pushed a fix in 4c8fd4f. I'll revert when the underlying problem has been fixed.