mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 15:56:07 +00:00
Clean up double chest meta logic
This commit is contained in:
1 parent
37770cb6f8
commit
cfcc8a6435
1 file changed
+1
-3
@@ -90,9 +90,7 @@ public class ItemYetaWrench extends Item implements ITool, IConduitControl, IAdv
|
||||
TileEntityChest masterChest = te.adjacentChestXNeg == null && te.adjacentChestZNeg == null ? te : te.adjacentChestXNeg == null ? te.adjacentChestZNeg: te.adjacentChestXNeg;
|
||||
if (masterChest != te) {
|
||||
int meta = world.getBlockMetadata(masterChest.xCoord, masterChest.yCoord, masterChest.zCoord);
|
||||
// Black magic
|
||||
int newMeta = meta + (meta % 2 == 0 ? 1 : -1);
|
||||
world.setBlockMetadataWithNotify(masterChest.xCoord, masterChest.yCoord, masterChest.zCoord, newMeta, 3);
|
||||
world.setBlockMetadataWithNotify(masterChest.xCoord, masterChest.yCoord, masterChest.zCoord, meta ^ 1, 3);
|
||||
} else {
|
||||
// If this is the master chest, we can just rotate twice
|
||||
block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side));
|
||||
|
||||
Reference in new issue
Block a user