mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-12 18:30:29 +00:00
Merge pull request #562 from SquidDev-CC/ComputerCraft/hotfix/turtle-sign-place
Be a little smarter about our detection of the placed sign
This commit is contained in:
commit
17dace979a
@ -382,7 +382,7 @@ public class TurtlePlaceCommand implements ITurtleCommand
|
||||
|
||||
// Do the deploying (put everything in the players inventory)
|
||||
boolean placed = false;
|
||||
|
||||
TileEntity existingTile = turtle.getWorld().getTileEntity( position );
|
||||
|
||||
// See PlayerInteractionManager.processRightClickBlock
|
||||
PlayerInteractEvent.RightClickBlock event = ForgeHooks.onRightClickBlock( turtlePlayer, EnumHand.MAIN_HAND, position, side, new Vec3d( hitX, hitY, hitZ ) );
|
||||
@ -426,12 +426,11 @@ public class TurtlePlaceCommand implements ITurtleCommand
|
||||
{
|
||||
World world = turtle.getWorld();
|
||||
TileEntity tile = world.getTileEntity( position );
|
||||
if( tile == null )
|
||||
if( tile == null || tile == existingTile )
|
||||
{
|
||||
BlockPos newPosition = WorldUtil.moveCoords( position, side );
|
||||
tile = world.getTileEntity( newPosition );
|
||||
tile = world.getTileEntity( WorldUtil.moveCoords( position, side ) );
|
||||
}
|
||||
if( tile != null && tile instanceof TileEntitySign )
|
||||
if( tile instanceof TileEntitySign )
|
||||
{
|
||||
TileEntitySign signTile = (TileEntitySign) tile;
|
||||
String s = (String)extraArguments[0];
|
||||
|
Loading…
Reference in New Issue
Block a user