mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Make fluid handlers side independent
This commit is contained in:
parent
413d0dc6fa
commit
1de62f5dc7
4 changed files with 10 additions and 11 deletions
|
@ -126,7 +126,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IS
|
|||
|
||||
@Override
|
||||
public FluidTank getFluidHandler(EnumFacing facing){
|
||||
return facing != EnumFacing.UP ? this.tank : null;
|
||||
return this.tank;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -189,7 +189,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
|
|||
|
||||
@Override
|
||||
public FluidTank getFluidHandler(EnumFacing facing){
|
||||
return facing != EnumFacing.DOWN ? this.tank : null;
|
||||
return this.tank;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,6 +41,8 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
|||
return false;
|
||||
}
|
||||
};
|
||||
private final FluidHandlerFluidMap handlerMap;
|
||||
|
||||
public int currentProcessTime;
|
||||
private int lastCanola;
|
||||
private int lastOil;
|
||||
|
@ -49,6 +51,10 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
|||
|
||||
public TileEntityFermentingBarrel(){
|
||||
super("fermentingBarrel");
|
||||
|
||||
this.handlerMap = new FluidHandlerFluidMap();
|
||||
this.handlerMap.addHandler(InitFluids.fluidCanolaOil, this.canolaTank);
|
||||
this.handlerMap.addHandler(InitFluids.fluidOil, this.oilTank);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -128,14 +134,7 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
|||
|
||||
@Override
|
||||
public IFluidHandler getFluidHandler(EnumFacing facing){
|
||||
FluidHandlerFluidMap map = new FluidHandlerFluidMap();
|
||||
if(facing != EnumFacing.DOWN){
|
||||
map.addHandler(InitFluids.fluidCanolaOil, this.canolaTank);
|
||||
}
|
||||
if(facing != EnumFacing.UP){
|
||||
map.addHandler(InitFluids.fluidOil, this.oilTank);
|
||||
}
|
||||
return map;
|
||||
return this.handlerMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -157,7 +157,7 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn
|
|||
|
||||
@Override
|
||||
public IFluidHandler getFluidHandler(EnumFacing facing){
|
||||
return facing != EnumFacing.DOWN ? this.tank : null;
|
||||
return this.tank;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue