Make fluid handlers side independent

This commit is contained in:
Ellpeck 2016-12-05 14:16:53 +01:00
parent 413d0dc6fa
commit 1de62f5dc7
4 changed files with 10 additions and 11 deletions

View file

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

View file

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

View file

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

View file

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