Added Bottom Texture for Coal Generator & Oil Generator

This commit is contained in:
Ellpeck 2015-07-02 01:26:37 +02:00
parent 0030adb2b0
commit cdcf20845b
7 changed files with 27 additions and 17 deletions

View file

@ -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

View file

@ -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

View file

@ -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);
}
}
}
}

View file

@ -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);
}
}
}
}

View file

@ -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()){

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B