mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +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
|
@Override
|
||||||
public FluidTank getFluidHandler(EnumFacing facing){
|
public FluidTank getFluidHandler(EnumFacing facing){
|
||||||
return facing != EnumFacing.UP ? this.tank : null;
|
return this.tank;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -189,7 +189,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FluidTank getFluidHandler(EnumFacing facing){
|
public FluidTank getFluidHandler(EnumFacing facing){
|
||||||
return facing != EnumFacing.DOWN ? this.tank : null;
|
return this.tank;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -41,6 +41,8 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
private final FluidHandlerFluidMap handlerMap;
|
||||||
|
|
||||||
public int currentProcessTime;
|
public int currentProcessTime;
|
||||||
private int lastCanola;
|
private int lastCanola;
|
||||||
private int lastOil;
|
private int lastOil;
|
||||||
|
@ -49,6 +51,10 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
||||||
|
|
||||||
public TileEntityFermentingBarrel(){
|
public TileEntityFermentingBarrel(){
|
||||||
super("fermentingBarrel");
|
super("fermentingBarrel");
|
||||||
|
|
||||||
|
this.handlerMap = new FluidHandlerFluidMap();
|
||||||
|
this.handlerMap.addHandler(InitFluids.fluidCanolaOil, this.canolaTank);
|
||||||
|
this.handlerMap.addHandler(InitFluids.fluidOil, this.oilTank);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -128,14 +134,7 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IFluidHandler getFluidHandler(EnumFacing facing){
|
public IFluidHandler getFluidHandler(EnumFacing facing){
|
||||||
FluidHandlerFluidMap map = new FluidHandlerFluidMap();
|
return this.handlerMap;
|
||||||
if(facing != EnumFacing.DOWN){
|
|
||||||
map.addHandler(InitFluids.fluidCanolaOil, this.canolaTank);
|
|
||||||
}
|
|
||||||
if(facing != EnumFacing.UP){
|
|
||||||
map.addHandler(InitFluids.fluidOil, this.oilTank);
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IFluidHandler getFluidHandler(EnumFacing facing){
|
public IFluidHandler getFluidHandler(EnumFacing facing){
|
||||||
return facing != EnumFacing.DOWN ? this.tank : null;
|
return this.tank;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue