aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/api/thermal/energy
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/api/thermal/energy')
-rw-r--r--src/main/java/gtPlusPlus/api/thermal/energy/IThermalConnection.java4
-rw-r--r--src/main/java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java13
-rw-r--r--src/main/java/gtPlusPlus/api/thermal/energy/IThermalHandler.java13
-rw-r--r--src/main/java/gtPlusPlus/api/thermal/energy/IThermalProvider.java11
-rw-r--r--src/main/java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java11
-rw-r--r--src/main/java/gtPlusPlus/api/thermal/energy/IThermalStorage.java13
-rw-r--r--src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorage.java219
-rw-r--r--src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java62
8 files changed, 169 insertions, 177 deletions
diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalConnection.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalConnection.java
index d8573000fc..c495f4856b 100644
--- a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalConnection.java
+++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalConnection.java
@@ -3,5 +3,5 @@ package gtPlusPlus.api.thermal.energy;
import net.minecraftforge.common.util.ForgeDirection;
public interface IThermalConnection {
- boolean canConnectThermalEnergy(ForgeDirection arg0);
-} \ No newline at end of file
+ boolean canConnectThermalEnergy(ForgeDirection arg0);
+}
diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java
index 072695bd76..14f566c1a7 100644
--- a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java
+++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java
@@ -3,13 +3,12 @@ package gtPlusPlus.api.thermal.energy;
import net.minecraft.item.ItemStack;
public interface IThermalContainerItem {
-
- int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2);
- int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2);
+ int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2);
- int getThermalEnergyStored(ItemStack arg0);
+ int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2);
- int getMaxThermalEnergyStored(ItemStack arg0);
-
-} \ No newline at end of file
+ int getThermalEnergyStored(ItemStack arg0);
+
+ int getMaxThermalEnergyStored(ItemStack arg0);
+}
diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalHandler.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalHandler.java
index 3ab7127757..6f0235f4d7 100644
--- a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalHandler.java
+++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalHandler.java
@@ -3,13 +3,12 @@ package gtPlusPlus.api.thermal.energy;
import net.minecraftforge.common.util.ForgeDirection;
public interface IThermalHandler extends IThermalProvider, IThermalReceiver {
-
- int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
- int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
+ int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
- int getThermalEnergyStored(ForgeDirection arg0);
+ int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
- int getMaxThermalEnergyStored(ForgeDirection arg0);
-
-} \ No newline at end of file
+ int getThermalEnergyStored(ForgeDirection arg0);
+
+ int getMaxThermalEnergyStored(ForgeDirection arg0);
+}
diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalProvider.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalProvider.java
index 0e4a060b23..a13a041176 100644
--- a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalProvider.java
+++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalProvider.java
@@ -3,11 +3,10 @@ package gtPlusPlus.api.thermal.energy;
import net.minecraftforge.common.util.ForgeDirection;
public interface IThermalProvider extends IThermalConnection {
-
- int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
- int getThermalEnergyStored(ForgeDirection arg0);
+ int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
- int getMaxThermalEnergyStored(ForgeDirection arg0);
-
-} \ No newline at end of file
+ int getThermalEnergyStored(ForgeDirection arg0);
+
+ int getMaxThermalEnergyStored(ForgeDirection arg0);
+}
diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java
index e08ce48a06..85be402658 100644
--- a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java
+++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java
@@ -3,11 +3,10 @@ package gtPlusPlus.api.thermal.energy;
import net.minecraftforge.common.util.ForgeDirection;
public interface IThermalReceiver extends IThermalConnection {
-
- int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
- int getThermalEnergyStored(ForgeDirection arg0);
+ int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
- int getMaxThermalEnergyStored(ForgeDirection arg0);
-
-} \ No newline at end of file
+ int getThermalEnergyStored(ForgeDirection arg0);
+
+ int getMaxThermalEnergyStored(ForgeDirection arg0);
+}
diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalStorage.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalStorage.java
index db3e6c8966..43d76b73ec 100644
--- a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalStorage.java
+++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalStorage.java
@@ -1,13 +1,12 @@
package gtPlusPlus.api.thermal.energy;
public interface IThermalStorage {
-
- int receiveThermalEnergy(int arg0, boolean arg1);
- int extractThermalEnergy(int arg0, boolean arg1);
+ int receiveThermalEnergy(int arg0, boolean arg1);
- int getThermalEnergyStored();
+ int extractThermalEnergy(int arg0, boolean arg1);
- int getMaxThermalEnergyStored();
-
-} \ No newline at end of file
+ int getThermalEnergyStored();
+
+ int getMaxThermalEnergyStored();
+}
diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorage.java b/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorage.java
index 9c7bb0066c..60efc687dc 100644
--- a/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorage.java
+++ b/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorage.java
@@ -3,114 +3,111 @@ 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
+
+ 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;
+ }
+}
diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java b/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java
index 47af7e79a6..54fa147efe 100644
--- a/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java
+++ b/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java
@@ -1,34 +1,34 @@
package gtPlusPlus.api.thermal.energy;
public class ThermalStorageAdv extends ThermalStorage {
-
- public ThermalStorageAdv(int arg0) {
- this(arg0, arg0, arg0);
- }
-
- public ThermalStorageAdv(int arg0, int arg1) {
- this(arg0, arg1, arg1);
- }
-
- public ThermalStorageAdv(int arg0, int arg1, int arg2) {
- super(arg0, arg1, arg2);
- }
-
- public int receiveEnergyNoLimit(int arg0, boolean arg1) {
- int arg2 = Math.min(super.capacity - super.thermal_energy, arg0);
- if (!arg1) {
- super.thermal_energy += arg2;
- }
-
- return arg2;
- }
-
- public int extractEnergyNoLimit(int arg0, boolean arg1) {
- int arg2 = Math.min(super.thermal_energy, arg0);
- if (!arg1) {
- super.thermal_energy -= arg2;
- }
-
- return arg2;
- }
-} \ No newline at end of file
+
+ public ThermalStorageAdv(int arg0) {
+ this(arg0, arg0, arg0);
+ }
+
+ public ThermalStorageAdv(int arg0, int arg1) {
+ this(arg0, arg1, arg1);
+ }
+
+ public ThermalStorageAdv(int arg0, int arg1, int arg2) {
+ super(arg0, arg1, arg2);
+ }
+
+ public int receiveEnergyNoLimit(int arg0, boolean arg1) {
+ int arg2 = Math.min(super.capacity - super.thermal_energy, arg0);
+ if (!arg1) {
+ super.thermal_energy += arg2;
+ }
+
+ return arg2;
+ }
+
+ public int extractEnergyNoLimit(int arg0, boolean arg1) {
+ int arg2 = Math.min(super.thermal_energy, arg0);
+ if (!arg1) {
+ super.thermal_energy -= arg2;
+ }
+
+ return arg2;
+ }
+}