ActionResultType in onActivated

This commit is contained in:
Sebastian Hartte
2020-06-02 19:15:23 +02:00
parent 3e78c713d1
commit cf9ab8a13b
42 changed files with 135 additions and 181 deletions
@@ -60,9 +60,9 @@ public class BlockIOPort extends AEBaseTileBlock
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand, final @Nullable ItemStack heldItem, final BlockRayTraceResult hit)
{
if( p.isShiftKeyDown() )
if( p.isCrouching() )
{
return false;
return ActionResultType.PASS;
}
final TileIOPort tg = this.getTileEntity( w, pos );
@@ -72,8 +72,8 @@ public class BlockIOPort extends AEBaseTileBlock
{
Platform.openGUI( p, tg, AEPartLocation.fromFacing(hit), GuiBridge.GUI_IOPORT );
}
return true;
return ActionResultType.SUCCESS;
}
return false;
return ActionResultType.PASS;
}
}