diff --git a/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java b/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java index 9991986c..533e9fbf 100644 --- a/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java +++ b/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java @@ -14,6 +14,12 @@ import cr0s.warpdrive.WarpDrive; public class BlockLaserTreeFarm extends BlockContainer { private IIcon[] iconBuffer; + public final static int ICON_IDLE = 0; + public final static int ICON_FARNINGLOWPOWER = 1; + public final static int ICON_FARMINGPOWERED = 2; + // 3 & 4 are reserved + private final static int ICON_BOTTOM = 5; + private final static int ICON_TOP = 6; public BlockLaserTreeFarm() { super(Material.rock); @@ -25,18 +31,26 @@ public class BlockLaserTreeFarm extends BlockContainer { @Override public void registerBlockIcons(IIconRegister par1IconRegister) { - iconBuffer = new IIcon[2]; - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:laserMediumTopBottom"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide0"); + iconBuffer = new IIcon[16]; + iconBuffer[ICON_IDLE ] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_idle"); + iconBuffer[ICON_FARNINGLOWPOWER ] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_farmingLowPower"); + iconBuffer[ICON_FARMINGPOWERED ] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_farmingPowered"); + iconBuffer[ICON_BOTTOM ] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmBottom"); + iconBuffer[ICON_TOP ] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmTop"); } @Override public IIcon getIcon(int side, int metadata) { - if (side == 0 || side == 1) { - return iconBuffer[0]; + if (side == 0) { + return iconBuffer[ICON_BOTTOM]; } - - return iconBuffer[1]; + if (side == 1) { + return iconBuffer[ICON_TOP]; + } + if (metadata < iconBuffer.length) { + return iconBuffer[metadata]; + } + return null; } @Override diff --git a/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java b/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java index 954060fb..71dcdf32 100644 --- a/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java +++ b/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java @@ -21,8 +21,8 @@ public class BlockMiningLaser extends BlockContainer { public final static int ICON_MININGPOWERED = 2; public final static int ICON_SCANNINGLOWPOWER = 3; public final static int ICON_SCANNINGPOWERED = 4; - private final static int ICON_TOP = 5; - private final static int ICON_BOTTOM = 6; + private final static int ICON_BOTTOM = 5; + private final static int ICON_TOP = 6; public BlockMiningLaser() { super(Material.rock); @@ -40,13 +40,16 @@ public class BlockMiningLaser extends BlockContainer { iconBuffer[ICON_MININGPOWERED ] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserSide_miningPowered"); iconBuffer[ICON_SCANNINGLOWPOWER] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserSide_scanningLowPower"); iconBuffer[ICON_SCANNINGPOWERED ] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserSide_scanningPowered"); - iconBuffer[ICON_TOP ] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserTop"); iconBuffer[ICON_BOTTOM ] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserBottom"); + iconBuffer[ICON_TOP ] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserTop"); } @Override public IIcon getIcon(int side, int metadata) { - if (side == 0 || side == 1) { + if (side == 0) { + return iconBuffer[ICON_BOTTOM]; + } + if (side == 1) { return iconBuffer[ICON_TOP]; } if (metadata < iconBuffer.length) { diff --git a/src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarm_activeLowPower.png b/src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarmSide_farmingLowPower.png similarity index 100% rename from src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarm_activeLowPower.png rename to src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarmSide_farmingLowPower.png diff --git a/src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarm_activePowered.png b/src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarmSide_farmingPowered.png similarity index 100% rename from src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarm_activePowered.png rename to src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarmSide_farmingPowered.png diff --git a/src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarm_idle.png b/src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarmSide_idle.png similarity index 100% rename from src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarm_idle.png rename to src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarmSide_idle.png diff --git a/src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarm_bottom.png b/src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarmTop.png similarity index 100% rename from src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarm_bottom.png rename to src/main/resources/assets/warpdrive/textures/blocks/collection/laserTreeFarmTop.png