Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be a little smarter about our detection of the placed sign #562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,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 @@ -409,12 +409,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