aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java')
-rw-r--r--src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java116
1 files changed, 0 insertions, 116 deletions
diff --git a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java
deleted file mode 100644
index 9c7bb0066c..0000000000
--- a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package gtPlusPlus.api.thermal.energy;
-
-import net.minecraft.nbt.NBTTagCompound;
-
-public class ThermalStorage implements IThermalStorage {
-
- protected int thermal_energy;
- protected int capacity;
- protected int maxReceive;
- protected int maxExtract;
-
- public ThermalStorage(int arg0) {
- this(arg0, arg0, arg0);
- }
-
- public ThermalStorage(int arg0, int arg1) {
- this(arg0, arg1, arg1);
- }
-
- public ThermalStorage(int arg0, int arg1, int arg2) {
- this.capacity = arg0;
- this.maxReceive = arg1;
- this.maxExtract = arg2;
- }
-
- public ThermalStorage readFromNBT(NBTTagCompound arg0) {
- this.thermal_energy = arg0.getInteger("ThermalEnergy");
- if (this.thermal_energy > this.capacity) {
- this.thermal_energy = this.capacity;
- }
- return this;
- }
-
- public NBTTagCompound writeToNBT(NBTTagCompound arg0) {
- if (this.thermal_energy < 0) {
- this.thermal_energy = 0;
- }
- arg0.setInteger("ThermalEnergy", this.thermal_energy);
- return arg0;
- }
-
- public void setCapacity(int arg0) {
- this.capacity = arg0;
- if (this.thermal_energy > arg0) {
- this.thermal_energy = arg0;
- }
-
- }
-
- public void setMaxTransfer(int arg0) {
- this.setMaxReceive(arg0);
- this.setMaxExtract(arg0);
- }
-
- public void setMaxReceive(int arg0) {
- this.maxReceive = arg0;
- }
-
- public void setMaxExtract(int arg0) {
- this.maxExtract = arg0;
- }
-
- public int getMaxReceive() {
- return this.maxReceive;
- }
-
- public int getMaxExtract() {
- return this.maxExtract;
- }
-
- public void setEnergyStored(int arg0) {
- this.thermal_energy = arg0;
- if (this.thermal_energy > this.capacity) {
- this.thermal_energy = this.capacity;
- } else if (this.thermal_energy < 0) {
- this.thermal_energy = 0;
- }
-
- }
-
- public void modifyEnergyStored(int arg0) {
- this.thermal_energy += arg0;
- if (this.thermal_energy > this.capacity) {
- this.thermal_energy = this.capacity;
- } else if (this.thermal_energy < 0) {
- this.thermal_energy = 0;
- }
-
- }
-
- public int receiveThermalEnergy(int arg0, boolean arg1) {
- int arg2 = Math.min(this.capacity - this.thermal_energy, Math.min(this.maxReceive, arg0));
- if (!arg1) {
- this.thermal_energy += arg2;
- }
-
- return arg2;
- }
-
- public int extractThermalEnergy(int arg0, boolean arg1) {
- int arg2 = Math.min(this.thermal_energy, Math.min(this.maxExtract, arg0));
- if (!arg1) {
- this.thermal_energy -= arg2;
- }
-
- return arg2;
- }
-
- public int getThermalEnergyStored() {
- return this.thermal_energy;
- }
-
- public int getMaxThermalEnergyStored() {
- return this.capacity;
- }
-} \ No newline at end of file