Skip to content

Commit

Permalink
Merge pull request dan200#562 from SquidDev-CC/ComputerCraft/hotfix/t…
Browse files Browse the repository at this point in the history
…urtle-sign-place

Be a little smarter about our detection of the placed sign
  • Loading branch information
SquidDev committed Jul 9, 2018
2 parents 7e18f2c + d405316 commit 17dace9
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ private static ItemStack deployOnBlock( @Nonnull ItemStack stack, ITurtleAccess

// 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 ) );
Expand Down Expand Up @@ -426,12 +426,11 @@ else if( actionResult == null )
{
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];
Expand Down

0 comments on commit 17dace9

Please sign in to comment.