From 401bbf2e6a09ca2dc0288c110c4d6c9d03559ab1 Mon Sep 17 00:00:00 2001 From: SquidDev Date: Sun, 2 Jun 2019 17:25:49 +0100 Subject: [PATCH] Fix turtle block placing failing --- .../computercraft/shared/turtle/core/TurtlePlaceCommand.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java b/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java index 463f385d8..bfa33b77d 100644 --- a/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java +++ b/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlaceCommand.java @@ -17,7 +17,6 @@ import dan200.computercraft.shared.util.DirectionUtil; import dan200.computercraft.shared.util.DropConsumer; import dan200.computercraft.shared.util.InventoryUtil; import dan200.computercraft.shared.util.WorldUtil; -import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -299,7 +298,6 @@ public class TurtlePlaceCommand implements ITurtleCommand } IBlockState state = world.getBlockState( position ); - Block block = state.getBlock(); boolean replaceable = state.isReplaceable( context ); if( !allowReplaceable && replaceable ) return false; @@ -317,8 +315,7 @@ public class TurtlePlaceCommand implements ITurtleCommand } } - // Check the block is solid or liquid - return block.isCollidable( state ); + return context.canPlace(); } @Nonnull