mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
-Made fluid pushers be able to push Fluid in more directions if not powered
This commit is contained in:
parent
b8171f20b8
commit
0030adb2b0
5 changed files with 19 additions and 7 deletions
|
@ -168,7 +168,7 @@ public class BlockCrafting{
|
|||
"CRC", "CBC", "CRC",
|
||||
'C', "cobblestone",
|
||||
'R', TheMiscBlocks.STONE_CASING.getOredictName(),
|
||||
'B', InitItems.itemBucketOil));
|
||||
'B', TheMiscItems.CANOLA.getOredictName()));
|
||||
|
||||
//Coal Generator
|
||||
if(ConfigCrafting.COAL_GENERATOR.isEnabled())
|
||||
|
|
|
@ -16,7 +16,7 @@ public class TileEntityBase extends TileEntity{
|
|||
public Packet getDescriptionPacket(){
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
this.writeToNBT(tag);
|
||||
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -54,8 +54,12 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
|
|||
|
||||
WorldUtil.fillBucket(tank, slots, 1, 2);
|
||||
|
||||
if(this.tank.getFluidAmount() > 0){
|
||||
if(this.tank.getFluidAmount() > 0 && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,8 +44,12 @@ 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){
|
||||
if(this.oilTank.getFluidAmount() > 0 && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +99,7 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
|
|||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack stack, int side){
|
||||
return (slot == 1 && stack.getItem() == Items.bucket) || (slot == 3 && FluidContainerRegistry.containsFluid(this.slots[0], new FluidStack(InitBlocks.fluidOil, FluidContainerRegistry.BUCKET_VOLUME)));
|
||||
return (slot == 1 && stack.getItem() == Items.bucket) || (slot == 3 && FluidContainerRegistry.containsFluid(stack, new FluidStack(InitBlocks.fluidOil, FluidContainerRegistry.BUCKET_VOLUME)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -139,8 +139,12 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements
|
|||
if(!this.isPlacer) WorldUtil.fillBucket(tank, slots, 0, 1);
|
||||
else WorldUtil.emptyBucket(tank, slots, 0, 1);
|
||||
|
||||
if(this.tank.getFluidAmount() > 0 && !this.isPlacer){
|
||||
WorldUtil.pushFluid(worldObj, xCoord, yCoord, zCoord, ForgeDirection.getOrientation(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)).getOpposite(), this.tank);
|
||||
if(!this.isPlacer && this.tank.getFluidAmount() > 0 && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
|
||||
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(amountBefore != this.tank.getFluidAmount()){
|
||||
|
|
Loading…
Reference in a new issue