Fixed #179 - Right clicking engineering table with item

This commit is contained in:
Calclavia 2014-01-30 20:32:03 +08:00
parent 62ce220dae
commit a298d8eedb
2 changed files with 9 additions and 10 deletions

View file

@ -163,7 +163,7 @@ public class BlockEngineeringTable extends BlockRIRotatable
/**
* Take out of engineering table.
*/
if (!world.isRemote && player.inventory.getCurrentItem() == null)
if (!world.isRemote)
{
tile.setPlayerInventory(player.inventory);
@ -188,6 +188,8 @@ public class BlockEngineeringTable extends BlockRIRotatable
tile.setPlayerInventory(null);
}
return true;
}
}

View file

@ -45,15 +45,12 @@ public abstract class RenderItemOverlayTile extends TileEntitySpecialRenderer
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
boolean isLooking = false;
if (player.isSneaking())
{
MovingObjectPosition objectPosition = player.rayTrace(8, 1);
if (objectPosition != null)
{
isLooking = objectPosition.blockX == tileEntity.xCoord && objectPosition.blockY == tileEntity.yCoord && objectPosition.blockZ == tileEntity.zCoord;
}
}
for (int i = 0; i < (matrixX * matrixZ); i++)
{