public void resetOther() { if (!isEmitting) { MachineRegistry m = MachineRegistry.getMachine(worldObj, target[0], target[1], target[2]); if (m == MachineRegistry.BELT) { TileEntityBeltHub te = (TileEntityBeltHub) worldObj.getBlockTileEntity(target[0], target[1], target[2]); te.reset(); } } else { MachineRegistry m = MachineRegistry.getMachine(worldObj, source[0], source[1], source[2]); if (m == MachineRegistry.BELT) { TileEntityBeltHub te = (TileEntityBeltHub) worldObj.getBlockTileEntity(source[0], source[1], source[2]); te.reset(); } } }
public boolean areInSamePlane(TileEntityBeltHub belt) { int meta = this.getBlockMetadata(); int meta2 = belt.getBlockMetadata(); if (meta == 0 || meta == 1) return meta2 == 0 || meta2 == 1; if (meta == 2 || meta == 3) return meta2 == 2 || meta2 == 3; if (meta == 4 || meta == 5) return meta2 == 4 || meta2 == 5; return false; }