diff --git a/src/main/java/techreborn/blocks/BlockChunkLoader.java b/src/main/java/techreborn/blocks/BlockChunkLoader.java index 31e52a323..6b51b9fae 100644 --- a/src/main/java/techreborn/blocks/BlockChunkLoader.java +++ b/src/main/java/techreborn/blocks/BlockChunkLoader.java @@ -55,7 +55,7 @@ public class BlockChunkLoader extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/BlockDigitalChest.java b/src/main/java/techreborn/blocks/BlockDigitalChest.java index d3553afe7..449074d9f 100644 --- a/src/main/java/techreborn/blocks/BlockDigitalChest.java +++ b/src/main/java/techreborn/blocks/BlockDigitalChest.java @@ -55,7 +55,7 @@ public class BlockDigitalChest extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/BlockElectricCraftingTable.java b/src/main/java/techreborn/blocks/BlockElectricCraftingTable.java index 8c5629a89..449140b84 100644 --- a/src/main/java/techreborn/blocks/BlockElectricCraftingTable.java +++ b/src/main/java/techreborn/blocks/BlockElectricCraftingTable.java @@ -6,7 +6,6 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; public class BlockElectricCraftingTable extends BlockMachineBase { @@ -36,7 +35,7 @@ public class BlockElectricCraftingTable extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/BlockFusionCoil.java b/src/main/java/techreborn/blocks/BlockFusionCoil.java index feb740415..367830f8d 100644 --- a/src/main/java/techreborn/blocks/BlockFusionCoil.java +++ b/src/main/java/techreborn/blocks/BlockFusionCoil.java @@ -6,7 +6,6 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; public class BlockFusionCoil extends BlockMachineBase { @@ -36,7 +35,7 @@ public class BlockFusionCoil extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/BlockFusionControlComputer.java b/src/main/java/techreborn/blocks/BlockFusionControlComputer.java index 300b8cb73..f969d8d2f 100644 --- a/src/main/java/techreborn/blocks/BlockFusionControlComputer.java +++ b/src/main/java/techreborn/blocks/BlockFusionControlComputer.java @@ -6,7 +6,6 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; public class BlockFusionControlComputer extends BlockMachineBase { @@ -36,7 +35,7 @@ public class BlockFusionControlComputer extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/BlockHighlyAdvancedMachine.java b/src/main/java/techreborn/blocks/BlockHighlyAdvancedMachine.java index eddc4afea..b34e2d414 100644 --- a/src/main/java/techreborn/blocks/BlockHighlyAdvancedMachine.java +++ b/src/main/java/techreborn/blocks/BlockHighlyAdvancedMachine.java @@ -6,7 +6,6 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; public class BlockHighlyAdvancedMachine extends BlockMachineBase { @@ -36,7 +35,7 @@ public class BlockHighlyAdvancedMachine extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/BlockMachineBase.java b/src/main/java/techreborn/blocks/BlockMachineBase.java index 4925cfd03..39fd430f6 100644 --- a/src/main/java/techreborn/blocks/BlockMachineBase.java +++ b/src/main/java/techreborn/blocks/BlockMachineBase.java @@ -11,7 +11,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; -import net.minecraft.world.ChunkCache; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import techreborn.client.TechRebornCreativeTab; @@ -64,7 +63,7 @@ public class BlockMachineBase extends BlockContainer { } world.setBlockMetadataWithNotify(x, y, z, b, 2); - setTileMeta(world, x, y, z, b); + setTileRotation(world, x, y, z, b); } @@ -77,16 +76,16 @@ public class BlockMachineBase extends BlockContainer { .floor_double((double) (player.rotationYaw * 4.0F / 360F) + 0.5D) & 3; if (l == 0) { - setTileMeta(world, x, y, z, 2); + setTileRotation(world, x, y, z, 2); } if (l == 1) { - setTileMeta(world, x, y, z, 5); + setTileRotation(world, x, y, z, 5); } if (l == 2) { - setTileMeta(world, x, y, z, 3); + setTileRotation(world, x, y, z, 3); } if (l == 3) { - setTileMeta(world, x, y, z, 4); + setTileRotation(world, x, y, z, 4); } super.onBlockPlacedBy(world, x, y, z, player, itemstack); } @@ -142,20 +141,20 @@ public class BlockMachineBase extends BlockContainer { } } - public void setTileMeta(World world, int x, int y, int z, int meta){ + public void setTileRotation(World world, int x, int y, int z, int meta){ if(world.getTileEntity(x, y, z) != null && world.getTileEntity(x, y, z) instanceof TileMachineBase){ - ((TileMachineBase) world.getTileEntity(x, y, z)).setMeta(meta); + ((TileMachineBase) world.getTileEntity(x, y, z)).setRotation(meta); } } - public int getTileMeta(World world, int x, int y, int z){ + public int getTileRotation(World world, int x, int y, int z){ if(world.getTileEntity(x, y, z) != null && world.getTileEntity(x, y, z) instanceof TileMachineBase){ - return ((TileMachineBase) world.getTileEntity(x, y, z)).getMeta(); + return ((TileMachineBase) world.getTileEntity(x, y, z)).getRotation(); } return 0; } - public int getTileMeta(IBlockAccess blockAccess, int x, int y, int z){ - return blockAccess.getTileEntity(x, y, z) != null ? getTileMeta(blockAccess.getTileEntity(x, y,z).getWorldObj(), x, y, z) : 0; + public int getTileRotation(IBlockAccess blockAccess, int x, int y, int z){ + return blockAccess.getTileEntity(x, y, z) != null ? getTileRotation(blockAccess.getTileEntity(x, y, z).getWorldObj(), x, y, z) : 0; } } diff --git a/src/main/java/techreborn/blocks/BlockMetalShelf.java b/src/main/java/techreborn/blocks/BlockMetalShelf.java index 526dedd45..c3eccfa27 100644 --- a/src/main/java/techreborn/blocks/BlockMetalShelf.java +++ b/src/main/java/techreborn/blocks/BlockMetalShelf.java @@ -44,7 +44,7 @@ public class BlockMetalShelf extends BlockMachineBase { @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta((World) blockAccess, x, y, z); + int metadata = getTileRotation((World) blockAccess, x, y, z); return metadata == 0 && side == 3 ? this.iconFrontEmpty : side == 1 ? this.iconTop : side == 0 ? this.iconBottom : (side == 0 ? this.iconTop diff --git a/src/main/java/techreborn/blocks/BlockSupercondensator.java b/src/main/java/techreborn/blocks/BlockSupercondensator.java index 0658a462a..6bbffecaa 100644 --- a/src/main/java/techreborn/blocks/BlockSupercondensator.java +++ b/src/main/java/techreborn/blocks/BlockSupercondensator.java @@ -6,7 +6,6 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; public class BlockSupercondensator extends BlockMachineBase { @@ -36,7 +35,7 @@ public class BlockSupercondensator extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/BlockWoodenshelf.java b/src/main/java/techreborn/blocks/BlockWoodenshelf.java index a4f48c1e7..4ee6aacfb 100644 --- a/src/main/java/techreborn/blocks/BlockWoodenshelf.java +++ b/src/main/java/techreborn/blocks/BlockWoodenshelf.java @@ -6,7 +6,6 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; public class BlockWoodenshelf extends BlockMachineBase { @@ -36,7 +35,7 @@ public class BlockWoodenshelf extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java b/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java index 113fc77c8..8e5cb4c2d 100644 --- a/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java +++ b/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java @@ -60,7 +60,7 @@ public class BlockAlloyFurnace extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockAlloySmelter.java b/src/main/java/techreborn/blocks/machine/BlockAlloySmelter.java index ec327ab88..b97b712d2 100644 --- a/src/main/java/techreborn/blocks/machine/BlockAlloySmelter.java +++ b/src/main/java/techreborn/blocks/machine/BlockAlloySmelter.java @@ -64,7 +64,7 @@ public class BlockAlloySmelter extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockAssemblingMachine.java b/src/main/java/techreborn/blocks/machine/BlockAssemblingMachine.java index c5b6fcb43..0be8d02f7 100644 --- a/src/main/java/techreborn/blocks/machine/BlockAssemblingMachine.java +++ b/src/main/java/techreborn/blocks/machine/BlockAssemblingMachine.java @@ -64,7 +64,7 @@ public class BlockAssemblingMachine extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockBlastFurnace.java b/src/main/java/techreborn/blocks/machine/BlockBlastFurnace.java index 853835766..b1b2dfce8 100644 --- a/src/main/java/techreborn/blocks/machine/BlockBlastFurnace.java +++ b/src/main/java/techreborn/blocks/machine/BlockBlastFurnace.java @@ -64,7 +64,7 @@ public class BlockBlastFurnace extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockCentrifuge.java b/src/main/java/techreborn/blocks/machine/BlockCentrifuge.java index 38e90205d..4fd6ecb7d 100644 --- a/src/main/java/techreborn/blocks/machine/BlockCentrifuge.java +++ b/src/main/java/techreborn/blocks/machine/BlockCentrifuge.java @@ -14,7 +14,6 @@ import net.minecraft.world.World; import techreborn.Core; import techreborn.blocks.BlockMachineBase; import techreborn.client.GuiHandler; -import techreborn.packets.PacketAesu; import techreborn.tiles.TileCentrifuge; import java.util.Random; @@ -68,7 +67,7 @@ public class BlockCentrifuge extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (blockAccess.getBlockMetadata(x, y, z) == 1) { if(side == 1){ return this.iconTopOn; diff --git a/src/main/java/techreborn/blocks/machine/BlockChargeBench.java b/src/main/java/techreborn/blocks/machine/BlockChargeBench.java index a7f0c452c..64819752c 100644 --- a/src/main/java/techreborn/blocks/machine/BlockChargeBench.java +++ b/src/main/java/techreborn/blocks/machine/BlockChargeBench.java @@ -59,7 +59,7 @@ public class BlockChargeBench extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockChemicalReactor.java b/src/main/java/techreborn/blocks/machine/BlockChemicalReactor.java index dd76d2e52..4a1f69007 100644 --- a/src/main/java/techreborn/blocks/machine/BlockChemicalReactor.java +++ b/src/main/java/techreborn/blocks/machine/BlockChemicalReactor.java @@ -64,7 +64,7 @@ public class BlockChemicalReactor extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockDistillationTower.java b/src/main/java/techreborn/blocks/machine/BlockDistillationTower.java index 0519e8b50..117fc6c78 100644 --- a/src/main/java/techreborn/blocks/machine/BlockDistillationTower.java +++ b/src/main/java/techreborn/blocks/machine/BlockDistillationTower.java @@ -8,7 +8,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; import techreborn.blocks.BlockMachineBase; import java.util.Random; @@ -41,7 +40,7 @@ public class BlockDistillationTower extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); return metadata == 0 && side == 3 ? this.iconFront : side == 1 ? this.iconTop : side == 0 ? this.iconBottom : (side == 0 ? this.iconTop diff --git a/src/main/java/techreborn/blocks/machine/BlockGrinder.java b/src/main/java/techreborn/blocks/machine/BlockGrinder.java index d9848c111..553c10e08 100644 --- a/src/main/java/techreborn/blocks/machine/BlockGrinder.java +++ b/src/main/java/techreborn/blocks/machine/BlockGrinder.java @@ -68,7 +68,7 @@ public class BlockGrinder extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockImplosionCompressor.java b/src/main/java/techreborn/blocks/machine/BlockImplosionCompressor.java index c2f7d88bf..41999fdb5 100644 --- a/src/main/java/techreborn/blocks/machine/BlockImplosionCompressor.java +++ b/src/main/java/techreborn/blocks/machine/BlockImplosionCompressor.java @@ -64,7 +64,7 @@ public class BlockImplosionCompressor extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockIndustrialElectrolyzer.java b/src/main/java/techreborn/blocks/machine/BlockIndustrialElectrolyzer.java index 3a3ce6344..739b233a3 100644 --- a/src/main/java/techreborn/blocks/machine/BlockIndustrialElectrolyzer.java +++ b/src/main/java/techreborn/blocks/machine/BlockIndustrialElectrolyzer.java @@ -65,7 +65,7 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockIndustrialSawmill.java b/src/main/java/techreborn/blocks/machine/BlockIndustrialSawmill.java index 37e4bb04c..6980e01f1 100644 --- a/src/main/java/techreborn/blocks/machine/BlockIndustrialSawmill.java +++ b/src/main/java/techreborn/blocks/machine/BlockIndustrialSawmill.java @@ -64,7 +64,7 @@ public class BlockIndustrialSawmill extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockLathe.java b/src/main/java/techreborn/blocks/machine/BlockLathe.java index e8e78de44..04df3548a 100644 --- a/src/main/java/techreborn/blocks/machine/BlockLathe.java +++ b/src/main/java/techreborn/blocks/machine/BlockLathe.java @@ -64,7 +64,7 @@ public class BlockLathe extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockMatterFabricator.java b/src/main/java/techreborn/blocks/machine/BlockMatterFabricator.java index 6bebe364a..6ec287b23 100644 --- a/src/main/java/techreborn/blocks/machine/BlockMatterFabricator.java +++ b/src/main/java/techreborn/blocks/machine/BlockMatterFabricator.java @@ -48,7 +48,7 @@ public class BlockMatterFabricator extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconOn; } else { diff --git a/src/main/java/techreborn/blocks/machine/BlockPlateCuttingMachine.java b/src/main/java/techreborn/blocks/machine/BlockPlateCuttingMachine.java index f0ac58de5..9a4eb0f6e 100644 --- a/src/main/java/techreborn/blocks/machine/BlockPlateCuttingMachine.java +++ b/src/main/java/techreborn/blocks/machine/BlockPlateCuttingMachine.java @@ -64,7 +64,7 @@ public class BlockPlateCuttingMachine extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFrontOn; } diff --git a/src/main/java/techreborn/blocks/machine/BlockRollingMachine.java b/src/main/java/techreborn/blocks/machine/BlockRollingMachine.java index 875627afc..13515051e 100644 --- a/src/main/java/techreborn/blocks/machine/BlockRollingMachine.java +++ b/src/main/java/techreborn/blocks/machine/BlockRollingMachine.java @@ -60,7 +60,7 @@ public class BlockRollingMachine extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); return metadata == 0 && side == 3 ? this.iconFront : side == 1 ? this.iconTop : side == 0 ? this.iconBottom : (side == 0 ? this.iconTop diff --git a/src/main/java/techreborn/blocks/machine/BlockVacuumFreezer.java b/src/main/java/techreborn/blocks/machine/BlockVacuumFreezer.java index fab13326f..4bba0bc11 100644 --- a/src/main/java/techreborn/blocks/machine/BlockVacuumFreezer.java +++ b/src/main/java/techreborn/blocks/machine/BlockVacuumFreezer.java @@ -8,7 +8,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; import techreborn.blocks.BlockMachineBase; import java.util.Random; @@ -41,7 +40,7 @@ public class BlockVacuumFreezer extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); return metadata == 0 && side == 3 ? this.iconFront : side == 1 ? this.iconTop : side == 0 ? this.iconBottom : (side == 0 ? this.iconTop diff --git a/src/main/java/techreborn/blocks/storage/BlockAesu.java b/src/main/java/techreborn/blocks/storage/BlockAesu.java index 7f2eb1283..b1c720d6a 100644 --- a/src/main/java/techreborn/blocks/storage/BlockAesu.java +++ b/src/main/java/techreborn/blocks/storage/BlockAesu.java @@ -4,9 +4,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; @@ -59,7 +57,7 @@ public class BlockAesu extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/storage/BlockIDSU.java b/src/main/java/techreborn/blocks/storage/BlockIDSU.java index e00aa827e..6c9e1403b 100644 --- a/src/main/java/techreborn/blocks/storage/BlockIDSU.java +++ b/src/main/java/techreborn/blocks/storage/BlockIDSU.java @@ -4,9 +4,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; @@ -44,7 +42,7 @@ public class BlockIDSU extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/storage/BlockLesu.java b/src/main/java/techreborn/blocks/storage/BlockLesu.java index 5bf9bf979..5af77f6bf 100644 --- a/src/main/java/techreborn/blocks/storage/BlockLesu.java +++ b/src/main/java/techreborn/blocks/storage/BlockLesu.java @@ -42,7 +42,7 @@ public class BlockLesu extends BlockMachineBase { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta(blockAccess, x, y, z); + int metadata = getTileRotation(blockAccess, x, y, z); if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) { return this.iconFront; } diff --git a/src/main/java/techreborn/blocks/storage/BlockLesuStorage.java b/src/main/java/techreborn/blocks/storage/BlockLesuStorage.java index 4cbb100f0..3f6d2bdae 100644 --- a/src/main/java/techreborn/blocks/storage/BlockLesuStorage.java +++ b/src/main/java/techreborn/blocks/storage/BlockLesuStorage.java @@ -41,7 +41,7 @@ public class BlockLesuStorage extends BlockMachineBase { @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = getTileMeta((World) blockAccess, x, y, z); + int metadata = getTileRotation((World) blockAccess, x, y, z); return metadata == 0 && side == 3 ? this.iconFront : side == 1 ? this.iconTop : side == 0 ? this.iconBottom : (side == 0 ? this.iconTop diff --git a/src/main/java/techreborn/tiles/TileAesu.java b/src/main/java/techreborn/tiles/TileAesu.java index ba11c8bd2..987d67cfb 100644 --- a/src/main/java/techreborn/tiles/TileAesu.java +++ b/src/main/java/techreborn/tiles/TileAesu.java @@ -53,12 +53,12 @@ public class TileAesu extends TilePowerAcceptor implements IWrenchable { @Override public short getFacing() { - return (short) getMeta(); + return (short) getRotation(); } @Override public void setFacing(short facing) { - setMeta(facing); + setRotation(facing); } @Override @@ -142,12 +142,12 @@ public class TileAesu extends TilePowerAcceptor implements IWrenchable { @Override public boolean canAcceptEnergy(ForgeDirection direction) { - return getMeta() != Functions.getIntDirFromDirection(direction); + return getRotation() != Functions.getIntDirFromDirection(direction); } @Override public boolean canProvideEnergy(ForgeDirection direction) { - return getMeta() == Functions.getIntDirFromDirection(direction); + return getRotation() == Functions.getIntDirFromDirection(direction); } @Override diff --git a/src/main/java/techreborn/tiles/TileMachineBase.java b/src/main/java/techreborn/tiles/TileMachineBase.java index c47c1dd63..53a77d1dc 100644 --- a/src/main/java/techreborn/tiles/TileMachineBase.java +++ b/src/main/java/techreborn/tiles/TileMachineBase.java @@ -13,7 +13,7 @@ import java.util.List; public abstract class TileMachineBase extends TileEntity { - int meta; + int rotation; public void syncWithAll() { if (!worldObj.isRemote) { @@ -41,12 +41,12 @@ public abstract class TileMachineBase extends TileEntity { readFromNBT(packet.func_148857_g()); } - public int getMeta() { - return meta; + public int getRotation() { + return rotation; } - public void setMeta(int meta) { - this.meta = meta; + public void setRotation(int rotation) { + this.rotation = rotation; syncWithAll(); worldObj.notifyBlockChange(xCoord, yCoord, zCoord, blockType); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); @@ -56,12 +56,12 @@ public abstract class TileMachineBase extends TileEntity { @Override public void readFromNBT(NBTTagCompound tagCompound) { super.readFromNBT(tagCompound); - meta = tagCompound.getInteger("meta"); + rotation = tagCompound.getInteger("rotation"); } @Override public void writeToNBT(NBTTagCompound tagCompound) { super.writeToNBT(tagCompound); - tagCompound.setInteger("meta", meta); + tagCompound.setInteger("rotation", rotation); } } diff --git a/src/main/java/techreborn/tiles/lesu/TileLesu.java b/src/main/java/techreborn/tiles/lesu/TileLesu.java index 08e3cd966..7401fe738 100644 --- a/src/main/java/techreborn/tiles/lesu/TileLesu.java +++ b/src/main/java/techreborn/tiles/lesu/TileLesu.java @@ -87,12 +87,12 @@ public class TileLesu extends TilePowerAcceptor {//TODO wrench @Override public boolean canAcceptEnergy(ForgeDirection direction) { - return Functions.getIntDirFromDirection(direction) != getMeta(); + return Functions.getIntDirFromDirection(direction) != getRotation(); } @Override public boolean canProvideEnergy(ForgeDirection direction) { - return Functions.getIntDirFromDirection(direction) == getMeta(); + return Functions.getIntDirFromDirection(direction) == getRotation(); } @Override