mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Configuration options for ashpit, leviathan turbine and all condensers
This commit is contained in:
parent
bcdd522464
commit
8e4d4418b6
@ -1,10 +1,15 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||||
import com.hbm.inventory.container.ContainerAshpit;
|
import com.hbm.inventory.container.ContainerAshpit;
|
||||||
import com.hbm.inventory.gui.GUIAshpit;
|
import com.hbm.inventory.gui.GUIAshpit;
|
||||||
import com.hbm.items.ItemEnums.EnumAshType;
|
import com.hbm.items.ItemEnums.EnumAshType;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.tileentity.IConfigurableMachine;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
@ -19,7 +24,7 @@ import net.minecraft.util.AxisAlignedBB;
|
|||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class TileEntityAshpit extends TileEntityMachineBase implements IGUIProvider {
|
public class TileEntityAshpit extends TileEntityMachineBase implements IGUIProvider, IConfigurableMachine {
|
||||||
|
|
||||||
private int playersUsing = 0;
|
private int playersUsing = 0;
|
||||||
public float doorAngle = 0;
|
public float doorAngle = 0;
|
||||||
@ -32,10 +37,40 @@ public class TileEntityAshpit extends TileEntityMachineBase implements IGUIProvi
|
|||||||
public int ashLevelFly;
|
public int ashLevelFly;
|
||||||
public int ashLevelSoot;
|
public int ashLevelSoot;
|
||||||
|
|
||||||
|
//Configurable values
|
||||||
|
public static int thresholdWood = 2000;
|
||||||
|
public static int thresholdCoal = 2000;
|
||||||
|
public static int thresholdMisc = 2000;
|
||||||
|
public static int thresholdFly = 2000;
|
||||||
|
public static int thresholdSoot = 8000;
|
||||||
|
|
||||||
public TileEntityAshpit() {
|
public TileEntityAshpit() {
|
||||||
super(5);
|
super(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConfigName() {
|
||||||
|
return "ashpit";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readIfPresent(JsonObject obj) {
|
||||||
|
thresholdWood = IConfigurableMachine.grab(obj, "I:thresholdWood", thresholdWood);
|
||||||
|
thresholdCoal = IConfigurableMachine.grab(obj, "I:thresholdCoal", thresholdCoal);
|
||||||
|
thresholdMisc = IConfigurableMachine.grab(obj, "I:thresholdMisc", thresholdMisc);
|
||||||
|
thresholdFly = IConfigurableMachine.grab(obj, "I:thresholdFly", thresholdFly);
|
||||||
|
thresholdSoot = IConfigurableMachine.grab(obj, "I:thresholdSoot", thresholdSoot);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeConfig(JsonWriter writer) throws IOException {
|
||||||
|
writer.name("I:thresholdWood").value(thresholdWood);
|
||||||
|
writer.name("I:thresholdCoal").value(thresholdCoal);
|
||||||
|
writer.name("I:thresholdMisc").value(thresholdMisc);
|
||||||
|
writer.name("I:thresholdFly").value(thresholdFly);
|
||||||
|
writer.name("I:thresholdSoot").value(thresholdSoot);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void openInventory() {
|
public void openInventory() {
|
||||||
if(!worldObj.isRemote) this.playersUsing++;
|
if(!worldObj.isRemote) this.playersUsing++;
|
||||||
@ -56,13 +91,12 @@ public class TileEntityAshpit extends TileEntityMachineBase implements IGUIProvi
|
|||||||
|
|
||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
int threshold = 2000;
|
|
||||||
|
|
||||||
if(processAsh(ashLevelWood, EnumAshType.WOOD, threshold)) ashLevelWood -= threshold;
|
if(processAsh(ashLevelWood, EnumAshType.WOOD, thresholdWood)) ashLevelWood -= thresholdWood;
|
||||||
if(processAsh(ashLevelCoal, EnumAshType.COAL, threshold)) ashLevelCoal -= threshold;
|
if(processAsh(ashLevelCoal, EnumAshType.COAL, thresholdCoal)) ashLevelCoal -= thresholdCoal;
|
||||||
if(processAsh(ashLevelMisc, EnumAshType.MISC, threshold)) ashLevelMisc -= threshold;
|
if(processAsh(ashLevelMisc, EnumAshType.MISC, thresholdMisc)) ashLevelMisc -= thresholdMisc;
|
||||||
if(processAsh(ashLevelFly, EnumAshType.FLY, threshold)) ashLevelFly -= threshold;
|
if(processAsh(ashLevelFly, EnumAshType.FLY, thresholdFly)) ashLevelFly -= thresholdFly;
|
||||||
if(processAsh(ashLevelSoot, EnumAshType.SOOT, threshold * 4)) ashLevelSoot -= threshold * 4;
|
if(processAsh(ashLevelSoot, EnumAshType.SOOT, thresholdSoot)) ashLevelSoot -= thresholdSoot;
|
||||||
|
|
||||||
isFull = false;
|
isFull = false;
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,10 @@ package com.hbm.tileentity.machine;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.handler.CompatHandler;
|
import com.hbm.handler.CompatHandler;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
@ -18,6 +21,7 @@ import com.hbm.main.MainRegistry;
|
|||||||
import com.hbm.packet.NBTPacket;
|
import com.hbm.packet.NBTPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.sound.AudioWrapper;
|
import com.hbm.sound.AudioWrapper;
|
||||||
|
import com.hbm.tileentity.IConfigurableMachine;
|
||||||
import com.hbm.tileentity.INBTPacketReceiver;
|
import com.hbm.tileentity.INBTPacketReceiver;
|
||||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||||
import com.hbm.util.CompatEnergyControl;
|
import com.hbm.util.CompatEnergyControl;
|
||||||
@ -41,10 +45,9 @@ import net.minecraft.util.AxisAlignedBB;
|
|||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||||
public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcceptor, IFluidSource, IEnergyProviderMK2, INBTPacketReceiver, IFluidStandardTransceiver, SimpleComponent, IInfoProviderEC, CompatHandler.OCComponent {
|
public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcceptor, IFluidSource, IEnergyProviderMK2, INBTPacketReceiver, IFluidStandardTransceiver, SimpleComponent, IInfoProviderEC, CompatHandler.OCComponent, IConfigurableMachine {
|
||||||
|
|
||||||
public long power;
|
public long power;
|
||||||
public static final long maxPower = 100000000000L;
|
|
||||||
private int turnTimer;
|
private int turnTimer;
|
||||||
public float rotor;
|
public float rotor;
|
||||||
public float lastRotor;
|
public float lastRotor;
|
||||||
@ -57,16 +60,46 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
|||||||
|
|
||||||
private AudioWrapper audio;
|
private AudioWrapper audio;
|
||||||
private float audioDesync;
|
private float audioDesync;
|
||||||
|
|
||||||
|
//Configurable values
|
||||||
|
public static long maxPower = 100000000000L;
|
||||||
|
public static int inputTankSize = 1_000_000_000;
|
||||||
|
public static int outputTankSize = 1_000_000_000;
|
||||||
|
public static double efficiency = 0.85D;
|
||||||
|
|
||||||
public TileEntityChungus() {
|
public TileEntityChungus() {
|
||||||
tanks = new FluidTank[2];
|
tanks = new FluidTank[2];
|
||||||
tanks[0] = new FluidTank(Fluids.STEAM, 1000000000, 0);
|
tanks[0] = new FluidTank(Fluids.STEAM, inputTankSize, 0);
|
||||||
tanks[1] = new FluidTank(Fluids.SPENTSTEAM, 1000000000, 1);
|
tanks[1] = new FluidTank(Fluids.SPENTSTEAM, outputTankSize, 1);
|
||||||
|
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
audioDesync = rand.nextFloat() * 0.05F;
|
audioDesync = rand.nextFloat() * 0.05F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConfigName() {
|
||||||
|
return "steamturbineLeviathan";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readIfPresent(JsonObject obj) {
|
||||||
|
maxPower = IConfigurableMachine.grab(obj, "L:maxPower", maxPower);
|
||||||
|
inputTankSize = IConfigurableMachine.grab(obj, "I:inputTankSize", inputTankSize);
|
||||||
|
outputTankSize = IConfigurableMachine.grab(obj, "I:outputTankSize", outputTankSize);
|
||||||
|
efficiency = IConfigurableMachine.grab(obj, "D:efficiency", efficiency);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeConfig(JsonWriter writer) throws IOException {
|
||||||
|
writer.name("L:maxPower").value(maxPower);
|
||||||
|
writer.name("INFO").value("leviathan steam turbine consumes all availible steam per tick");
|
||||||
|
writer.name("I:inputTankSize").value(inputTankSize);
|
||||||
|
writer.name("I:outputTankSize").value(outputTankSize);
|
||||||
|
writer.name("D:efficiency").value(efficiency);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
|
|
||||||
@ -79,7 +112,7 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
|||||||
boolean valid = false;
|
boolean valid = false;
|
||||||
if(in.hasTrait(FT_Coolable.class)) {
|
if(in.hasTrait(FT_Coolable.class)) {
|
||||||
FT_Coolable trait = in.getTrait(FT_Coolable.class);
|
FT_Coolable trait = in.getTrait(FT_Coolable.class);
|
||||||
double eff = trait.getEfficiency(CoolingType.TURBINE) * 0.85D; //85% efficiency
|
double eff = trait.getEfficiency(CoolingType.TURBINE) * efficiency; //85% efficiency by default
|
||||||
if(eff > 0) {
|
if(eff > 0) {
|
||||||
tanks[1].setTankType(trait.coolsTo);
|
tanks[1].setTankType(trait.coolsTo);
|
||||||
int inputOps = tanks[0].getFill() / trait.amountReq;
|
int inputOps = tanks[0].getFill() / trait.amountReq;
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
import com.hbm.saveddata.TomSaveData;
|
import com.hbm.saveddata.TomSaveData;
|
||||||
|
import com.hbm.tileentity.IConfigurableMachine;
|
||||||
import com.hbm.tileentity.INBTPacketReceiver;
|
import com.hbm.tileentity.INBTPacketReceiver;
|
||||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||||
import com.hbm.util.CompatEnergyControl;
|
import com.hbm.util.CompatEnergyControl;
|
||||||
@ -12,7 +17,7 @@ import api.hbm.tile.IInfoProviderEC;
|
|||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.EnumSkyBlock;
|
import net.minecraft.world.EnumSkyBlock;
|
||||||
|
|
||||||
public class TileEntityCondenser extends TileEntityLoadedBase implements IFluidStandardTransceiver, INBTPacketReceiver, IInfoProviderEC {
|
public class TileEntityCondenser extends TileEntityLoadedBase implements IFluidStandardTransceiver, INBTPacketReceiver, IInfoProviderEC, IConfigurableMachine {
|
||||||
|
|
||||||
public int age = 0;
|
public int age = 0;
|
||||||
public FluidTank[] tanks;
|
public FluidTank[] tanks;
|
||||||
@ -20,11 +25,34 @@ public class TileEntityCondenser extends TileEntityLoadedBase implements IFluidS
|
|||||||
public int waterTimer = 0;
|
public int waterTimer = 0;
|
||||||
protected int throughput;
|
protected int throughput;
|
||||||
|
|
||||||
|
//Configurable values
|
||||||
|
public static int inputTankSize = 100;
|
||||||
|
public static int outputTankSize = 100;
|
||||||
|
|
||||||
public TileEntityCondenser() {
|
public TileEntityCondenser() {
|
||||||
tanks = new FluidTank[2];
|
tanks = new FluidTank[2];
|
||||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 100);
|
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, inputTankSize);
|
||||||
tanks[1] = new FluidTank(Fluids.WATER, 100);
|
tanks[1] = new FluidTank(Fluids.WATER, outputTankSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConfigName() {
|
||||||
|
return "condenser";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readIfPresent(JsonObject obj) {
|
||||||
|
inputTankSize = IConfigurableMachine.grab(obj, "I:inputTankSize", inputTankSize);
|
||||||
|
outputTankSize = IConfigurableMachine.grab(obj, "I:outputTankSize", outputTankSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeConfig(JsonWriter writer) throws IOException {
|
||||||
|
writer.name("I:inputTankSize").value(inputTankSize);
|
||||||
|
writer.name("I:outputTankSize").value(outputTankSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
|
import com.hbm.tileentity.IConfigurableMachine;
|
||||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||||
|
|
||||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||||
@ -16,16 +21,41 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
public class TileEntityCondenserPowered extends TileEntityCondenser implements IEnergyReceiverMK2 {
|
public class TileEntityCondenserPowered extends TileEntityCondenser implements IEnergyReceiverMK2 {
|
||||||
|
|
||||||
public long power;
|
public long power;
|
||||||
public static final long maxPower = 10_000_000;
|
|
||||||
public float spin;
|
public float spin;
|
||||||
public float lastSpin;
|
public float lastSpin;
|
||||||
|
|
||||||
|
//Configurable values
|
||||||
|
public static long maxPower = 10_000_000;
|
||||||
|
public static int inputTankSizeP = 1_000_000;
|
||||||
|
public static int outputTankSizeP = 1_000_000;
|
||||||
|
public static int powerConsumption = 10;
|
||||||
|
|
||||||
public TileEntityCondenserPowered() {
|
public TileEntityCondenserPowered() {
|
||||||
tanks = new FluidTank[2];
|
tanks = new FluidTank[2];
|
||||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 1_000_000);
|
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, inputTankSizeP);
|
||||||
tanks[1] = new FluidTank(Fluids.WATER, 1_000_000);
|
tanks[1] = new FluidTank(Fluids.WATER, outputTankSizeP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConfigName() {
|
||||||
|
return "condenserPowered";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void readIfPresent(JsonObject obj) {
|
||||||
|
maxPower = IConfigurableMachine.grab(obj, "L:maxPower", maxPower);
|
||||||
|
inputTankSizeP = IConfigurableMachine.grab(obj, "I:inputTankSize", inputTankSizeP);
|
||||||
|
outputTankSizeP = IConfigurableMachine.grab(obj, "I:outputTankSize", outputTankSizeP);
|
||||||
|
powerConsumption = IConfigurableMachine.grab(obj, "I:powerConsumption", powerConsumption);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeConfig(JsonWriter writer) throws IOException {
|
||||||
|
writer.name("L:maxPower").value(maxPower);
|
||||||
|
writer.name("I:inputTankSize").value(inputTankSizeP);
|
||||||
|
writer.name("I:outputTankSize").value(outputTankSizeP);
|
||||||
|
writer.name("I:powerConsumption").value(powerConsumption);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
@ -63,7 +93,7 @@ public class TileEntityCondenserPowered extends TileEntityCondenser implements I
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postConvert(int convert) {
|
public void postConvert(int convert) {
|
||||||
this.power -= convert * 10;
|
this.power -= convert * powerConsumption;
|
||||||
if(this.power < 0) this.power = 0;
|
if(this.power < 0) this.power = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,15 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
import com.hbm.config.GeneralConfig;
|
import com.hbm.config.GeneralConfig;
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.tileentity.IConfigurableMachine;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -15,12 +20,33 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
|
|
||||||
public class TileEntityTowerLarge extends TileEntityCondenser {
|
public class TileEntityTowerLarge extends TileEntityCondenser {
|
||||||
|
|
||||||
|
//Configurable values
|
||||||
|
public static int inputTankSizeTL = 10_000;
|
||||||
|
public static int outputTankSizeTL = 10_000;
|
||||||
|
|
||||||
public TileEntityTowerLarge() {
|
public TileEntityTowerLarge() {
|
||||||
tanks = new FluidTank[2];
|
tanks = new FluidTank[2];
|
||||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 10000);
|
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, inputTankSizeTL);
|
||||||
tanks[1] = new FluidTank(Fluids.WATER, 10000);
|
tanks[1] = new FluidTank(Fluids.WATER, outputTankSizeTL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConfigName() {
|
||||||
|
return "condenserTowerLarge";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readIfPresent(JsonObject obj) {
|
||||||
|
inputTankSizeTL = IConfigurableMachine.grab(obj, "I:inputTankSize", inputTankSizeTL);
|
||||||
|
outputTankSizeTL = IConfigurableMachine.grab(obj, "I:outputTankSize", outputTankSizeTL);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeConfig(JsonWriter writer) throws IOException {
|
||||||
|
writer.name("I:inputTankSize").value(inputTankSizeTL);
|
||||||
|
writer.name("I:outputTankSize").value(outputTankSizeTL);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
|
|||||||
@ -1,11 +1,16 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
import com.hbm.config.GeneralConfig;
|
import com.hbm.config.GeneralConfig;
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.tileentity.IConfigurableMachine;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -15,12 +20,33 @@ import net.minecraft.util.AxisAlignedBB;
|
|||||||
|
|
||||||
public class TileEntityTowerSmall extends TileEntityCondenser {
|
public class TileEntityTowerSmall extends TileEntityCondenser {
|
||||||
|
|
||||||
|
//Configurable values
|
||||||
|
public static int inputTankSizeTS = 1_000;
|
||||||
|
public static int outputTankSizeTS = 1_000;
|
||||||
|
|
||||||
public TileEntityTowerSmall() {
|
public TileEntityTowerSmall() {
|
||||||
tanks = new FluidTank[2];
|
tanks = new FluidTank[2];
|
||||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 1000);
|
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, inputTankSizeTS);
|
||||||
tanks[1] = new FluidTank(Fluids.WATER, 1000);
|
tanks[1] = new FluidTank(Fluids.WATER, outputTankSizeTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConfigName() {
|
||||||
|
return "condenserTowerSmall";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readIfPresent(JsonObject obj) {
|
||||||
|
inputTankSizeTS = IConfigurableMachine.grab(obj, "I:inputTankSize", inputTankSizeTS);
|
||||||
|
outputTankSizeTS = IConfigurableMachine.grab(obj, "I:outputTankSize", outputTankSizeTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeConfig(JsonWriter writer) throws IOException {
|
||||||
|
writer.name("I:inputTankSize").value(inputTankSizeTS);
|
||||||
|
writer.name("I:outputTankSize").value(outputTankSizeTS);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user