From cdcf20845b828b1747260740e2d8d1f4b8c2bd56 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 2 Jul 2015 01:26:37 +0200 Subject: [PATCH] Added Bottom Texture for Coal Generator & Oil Generator --- .../blocks/BlockCoalGenerator.java | 4 +++- .../blocks/BlockOilGenerator.java | 4 +++- .../tile/TileEntityCanolaPress.java | 12 +++++++----- .../tile/TileEntityFermentingBarrel.java | 12 +++++++----- .../tile/TileEntityFluidCollector.java | 12 +++++++----- .../textures/blocks/blockCoalGeneratorBottom.png | Bin 0 -> 556 bytes .../textures/blocks/blockOilGeneratorBottom.png | Bin 0 -> 556 bytes 7 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 src/main/resources/assets/actuallyadditions/textures/blocks/blockCoalGeneratorBottom.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/blocks/blockOilGeneratorBottom.png diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java index 637beffdb..5b155eaf3 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java @@ -25,6 +25,7 @@ import java.util.Random; public class BlockCoalGenerator extends BlockContainerBase implements INameableItem{ private IIcon topIcon; + private IIcon bottomIcon; public BlockCoalGenerator(){ super(Material.rock); @@ -58,7 +59,7 @@ public class BlockCoalGenerator extends BlockContainerBase implements INameableI @Override public IIcon getIcon(int side, int meta){ - return side <= 1 ? this.topIcon : this.blockIcon; + return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon; } @Override @@ -66,6 +67,7 @@ public class BlockCoalGenerator extends BlockContainerBase implements INameableI public void registerBlockIcons(IIconRegister iconReg){ this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName()); this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top"); + this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Bottom"); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java index 6fc338596..b0f58c88b 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java @@ -25,6 +25,7 @@ import java.util.Random; public class BlockOilGenerator extends BlockContainerBase implements INameableItem{ private IIcon topIcon; + private IIcon bottomIcon; public BlockOilGenerator(){ super(Material.rock); @@ -58,7 +59,7 @@ public class BlockOilGenerator extends BlockContainerBase implements INameableIt @Override public IIcon getIcon(int side, int meta){ - return side <= 1 ? this.topIcon : this.blockIcon; + return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon; } @Override @@ -66,6 +67,7 @@ public class BlockOilGenerator extends BlockContainerBase implements INameableIt public void registerBlockIcons(IIconRegister iconReg){ this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName()); this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top"); + this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Bottom"); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCanolaPress.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCanolaPress.java index 4fb755d34..7cf864a5c 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCanolaPress.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCanolaPress.java @@ -54,12 +54,14 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE WorldUtil.fillBucket(tank, slots, 1, 2); - if(this.tank.getFluidAmount() > 0 && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ + if(this.tank.getFluidAmount() > 0){ WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, this.tank); + if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, this.tank); + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, this.tank); + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, this.tank); + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, this.tank); + } } } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFermentingBarrel.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFermentingBarrel.java index d88556c17..c652f6c72 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFermentingBarrel.java @@ -44,12 +44,14 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen WorldUtil.emptyBucket(canolaTank, slots, 0, 1, InitBlocks.fluidCanolaOil); WorldUtil.fillBucket(oilTank, slots, 2, 3); - if(this.oilTank.getFluidAmount() > 0 && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ + if(this.oilTank.getFluidAmount() > 0){ WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, this.oilTank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, this.oilTank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, this.oilTank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, this.oilTank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, this.oilTank); + if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, this.oilTank); + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, this.oilTank); + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, this.oilTank); + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, this.oilTank); + } } } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFluidCollector.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFluidCollector.java index f8c0337b1..460becb4c 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFluidCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFluidCollector.java @@ -139,12 +139,14 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements if(!this.isPlacer) WorldUtil.fillBucket(tank, slots, 0, 1); else WorldUtil.emptyBucket(tank, slots, 0, 1); - if(!this.isPlacer && this.tank.getFluidAmount() > 0 && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ + if(!this.isPlacer && this.tank.getFluidAmount() > 0){ WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.DOWN, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, this.tank); - WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, this.tank); + if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.NORTH, this.tank); + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.EAST, this.tank); + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.SOUTH, this.tank); + WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.WEST, this.tank); + } } if(amountBefore != this.tank.getFluidAmount()){ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockCoalGeneratorBottom.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockCoalGeneratorBottom.png new file mode 100644 index 0000000000000000000000000000000000000000..782c826d5407145b9b1a4cde782b2b276a135e5d GIT binary patch literal 556 zcmV+{0@MA8P)JN(F*wVgWkSG&`Nn zy}ETa=F}UwGM}a2ykl@pwF$Ob{1~#UBMCtJMmNX0r(!W=e)Yp$Pi@J~eO`1VOjk-E21GU^Qqu8w6hWLpdgtN|dVp%%HXV~qyg=;#o)X@d%Y`YiVkWZZ^U2#mm2A*(*ChdY uc_oh_LD?iD|6i*_lTcI9-!_0|7{)J^fZV_$UEJN(F*wVgWkSG&`Nn zy}ETa=F}UwGM}a2ykl@pwF$Ob{1~#UBMCtJMmNX0r(!W=e)Yp$Pi@J~eO`1VOjk-E21GU^Qqu8w6hWLpdgtN|dVp%%HXV~qyg=;#o)X@d%Y`YiVkWZZ^U2#mm2A*(*ChdY uc_oh_LD?iD|6i*_lTcI9-!_0|7{)J^fZV_$UE