Fix Refinery Filters

This commit is contained in:
CovertJaguar 2013-08-25 12:59:59 -07:00
parent c625b5484c
commit 4609d74a8e
3 changed files with 15 additions and 9 deletions

View file

@ -50,17 +50,15 @@ public class SingleUseTank extends Tank {
}
@Override
public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
public void writeTankToNBT(NBTTagCompound nbt) {
super.writeTankToNBT(nbt);
if (acceptedFluid != null)
nbt.setString("acceptedFluid", acceptedFluid.getName());
return nbt;
}
@Override
public FluidTank readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
public void readTankFromNBT(NBTTagCompound nbt) {
super.readTankFromNBT(nbt);
acceptedFluid = FluidRegistry.getFluid(nbt.getString("acceptedFluid"));
return this;
}
}

View file

@ -41,22 +41,30 @@ public class Tank extends FluidTank {
}
@Override
public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
public final NBTTagCompound writeToNBT(NBTTagCompound nbt) {
NBTTagCompound tankData = new NBTTagCompound();
super.writeToNBT(tankData);
writeTankToNBT(tankData);
nbt.setCompoundTag(name, tankData);
return nbt;
}
@Override
public FluidTank readFromNBT(NBTTagCompound nbt) {
public final FluidTank readFromNBT(NBTTagCompound nbt) {
if (nbt.hasKey(name)) {
NBTTagCompound tankData = nbt.getCompoundTag(name);
super.readFromNBT(tankData);
readTankFromNBT(tankData);
}
return this;
}
public void writeTankToNBT(NBTTagCompound nbt) {
}
public void readTankFromNBT(NBTTagCompound nbt) {
}
public ToolTip getToolTip() {
return toolTip;
}

View file

@ -62,7 +62,7 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IPowe
}
private void initPowerProvider() {
powerHandler.configure(25, 100, 25, 1000);
powerHandler.configure(50, 150, 25, 1000);
powerHandler.configurePowerPerdition(1, 1);
}