aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-04-29 12:55:19 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-04-29 12:55:19 +1000
commit4109c9575dd6d8a89f03e1242493dca228255570 (patch)
treecb71094617867ee843efb5ad1c456286f2269f4a /src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java
parent47d2b68b66fb9958b57c3ff81f1e73e8f6afd91b (diff)
downloadGT5-Unofficial-4109c9575dd6d8a89f03e1242493dca228255570.tar.gz
GT5-Unofficial-4109c9575dd6d8a89f03e1242493dca228255570.tar.bz2
GT5-Unofficial-4109c9575dd6d8a89f03e1242493dca228255570.zip
+ Added Framework for Thermal power based upon the code used for RF.
> This is more effective than trying to use the GT EU code for the exact same thing.
Diffstat (limited to 'src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java')
-rw-r--r--src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java b/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java
new file mode 100644
index 0000000000..e2e3c50ab7
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java
@@ -0,0 +1,42 @@
+package gtPlusPlus.api.thermal.sample;
+
+import gtPlusPlus.api.thermal.energy.IThermalHandler;
+import gtPlusPlus.api.thermal.energy.ThermalStorage;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
+public class TileThermalHandler extends TileEntity implements IThermalHandler {
+
+ protected ThermalStorage storage = new ThermalStorage(32000);
+
+ public void readFromNBT(NBTTagCompound arg0) {
+ super.readFromNBT(arg0);
+ this.storage.readFromNBT(arg0);
+ }
+
+ public void writeToNBT(NBTTagCompound arg0) {
+ super.writeToNBT(arg0);
+ this.storage.writeToNBT(arg0);
+ }
+
+ public boolean canConnectThermalEnergy(ForgeDirection arg0) {
+ return true;
+ }
+
+ public int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) {
+ return this.storage.receiveThermalEnergy(arg1, arg2);
+ }
+
+ public int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) {
+ return this.storage.extractThermalEnergy(arg1, arg2);
+ }
+
+ public int getThermalEnergyStored(ForgeDirection arg0) {
+ return this.storage.getThermalEnergyStored();
+ }
+
+ public int getMaxThermalEnergyStored(ForgeDirection arg0) {
+ return this.storage.getMaxThermalEnergyStored();
+ }
+} \ No newline at end of file