Fixed some Electric Chest bugs

Electric Chest was not updating when it was (un)locked, meaning that
mechanical pipes would not (dis)connect and reconnect.

Also noticed that Electric Chest won't accept transporters connecting to
the bottom, which I thought was odd, however it looked intentional so I
left it alone. (..?)

Also made it so electric chests will not open if there is a solid block
above them.
This commit is contained in:
jstockwin 2014-08-03 00:47:18 +01:00
parent 26ffda6a1a
commit 79ce886df2
2 changed files with 2 additions and 1 deletions

View file

@ -722,7 +722,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
{
TileEntityElectricChest electricChest = (TileEntityElectricChest)tileEntity;
if(!entityplayer.isSneaking())
if(!(entityplayer.isSneaking() || world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN)))
{
if(electricChest.canAccess())
{

View file

@ -102,6 +102,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
{
TileEntityElectricChest tileEntity = (TileEntityElectricChest)message.coord4D.getTileEntity(player.worldObj);
tileEntity.locked = message.locked;
player.worldObj.notifyBlocksOfNeighborChange(message.coord4D.xCoord,message.coord4D.yCoord,message.coord4D.zCoord,Mekanism.MachineBlock);
}
else {
ItemStack stack = player.getCurrentEquippedItem();