CC: Tweaked

CC: Tweaked

57M Downloads

Crash when a turtle tries to place a slab above itself when using the DoubleSlabs mod

timewarp1 opened this issue ยท 0 comments

commented

Minecraft Version: 1.16.1
CC: Tweaked Version: 1.90.3
Crash Log: https://pastebin.com/zjFTvUPW

Reproduction steps:
Starting with both this mod and DoubleSlabs installed, place a turtle on the ground with space above it, place a slab in its inventory, and create a script that executes "turtle.placeUp()", then run it. The server should immediately crash, and the exception should be:

java.lang.NullPointerException: Ticking block entity
    at net.minecraft.entity.player.ServerPlayerEntity.func_71128_l(ServerPlayerEntity.java:964) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraftforge.fml.network.NetworkHooks.openGui(NetworkHooks.java:188) ~[?:?] {re:classloading}
    at dan200.computercraft.shared.network.container.ContainerData.open(ContainerData.java:32) ~[?:1.90.3] {re:classloading}
    at dan200.computercraft.shared.computer.blocks.TileComputerBase.onActivate(TileComputerBase.java:126) ~[?:1.90.3] {re:classloading}
    at dan200.computercraft.shared.turtle.blocks.TileTurtle.onActivate(TileTurtle.java:198) ~[?:1.90.3] {re:classloading}
    at dan200.computercraft.shared.common.BlockGeneric.func_225533_a_(BlockGeneric.java:55) ~[?:1.90.3] {re:classloading}
    at net.minecraft.block.AbstractBlock$AbstractBlockState.func_227031_a_(AbstractBlock.java:633) ~[?:?] {re:classloading}
    at cjminecraft.doubleslabs.Events.canPlace(Events.java:54) ~[?:3.3.3] {re:classloading}
    at cjminecraft.doubleslabs.Events.onItemUse(Events.java:188) ~[?:3.3.3] {re:classloading}
    at net.minecraftforge.eventbus.ASMEventHandler_5_Events_onItemUse_RightClickBlock.invoke(.dynamic) ~[?:?] {}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-3.0.3-service.jar:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:297) ~[eventbus-3.0.3-service.jar:?] {}
    at net.minecraftforge.common.ForgeHooks.onRightClickBlock(ForgeHooks.java:776) ~[?:?] {re:classloading}
    at dan200.computercraft.shared.turtle.core.TurtlePlaceCommand.deployOnBlock(TurtlePlaceCommand.java:357) ~[?:1.90.3] {re:classloading}
    at dan200.computercraft.shared.turtle.core.TurtlePlaceCommand.deploy(TurtlePlaceCommand.java:154) ~[?:1.90.3] {re:classloading}
    at dan200.computercraft.shared.turtle.core.TurtlePlaceCommand.execute(TurtlePlaceCommand.java:81) ~[?:1.90.3] {re:classloading}
    at dan200.computercraft.shared.turtle.core.TurtleBrain.updateCommands(TurtleBrain.java:769) ~[?:1.90.3] {re:classloading}
    at dan200.computercraft.shared.turtle.core.TurtleBrain.update(TurtleBrain.java:129) ~[?:1.90.3] {re:classloading}
    at dan200.computercraft.shared.turtle.blocks.TileTurtle.func_73660_a(TileTurtle.java:217) ~[?:1.90.3] {re:classloading}
    at net.minecraft.world.World.func_217391_K(World.java:533) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:364) ~[?:?] {re:classloading}
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:852) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:788) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:121) ~[?:?] {re:classloading,xf:OptiFine:default}
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:643) [?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.lambda$func_240784_a_$0(MinecraftServer.java:230) [?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer$$Lambda$5145/255600617.run(Unknown Source) [?:?] {}
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51] {}

When using this mod alongside the DoubleSlabs mod, there's a null pointer exception that occurs when a turtle tries to place a slab above itself, if the block above that space is empty. Not sure if the problematic code is here or in the DoubleSlabs source, but figured I'd put this here just in case.