From e5193543b16561e0f6b13ba0a347d94092d8a9b4 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 11:09:03 +1000 Subject: + Thermal Boiler now pulls lava filters from an input bus. + Added some minor GUI functions to GregtechMeta_MultiBlockBase. + Added some new Reflection functions. --- .../gtPlusPlus/api/thermal/energy/ThermalStorage.java | 4 ++-- .../api/thermal/sample/ItemThermalContainer.java | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/Java/gtPlusPlus/api/thermal') diff --git a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java index 22a47b2807..9c7bb0066c 100644 --- a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java +++ b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java @@ -24,7 +24,7 @@ public class ThermalStorage implements IThermalStorage { } public ThermalStorage readFromNBT(NBTTagCompound arg0) { - this.thermal_energy = arg0.getInteger("Energy"); + this.thermal_energy = arg0.getInteger("ThermalEnergy"); if (this.thermal_energy > this.capacity) { this.thermal_energy = this.capacity; } @@ -35,7 +35,7 @@ public class ThermalStorage implements IThermalStorage { if (this.thermal_energy < 0) { this.thermal_energy = 0; } - arg0.setInteger("Energy", this.thermal_energy); + arg0.setInteger("ThermalEnergy", this.thermal_energy); return arg0; } diff --git a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java index e33a47d220..015e5fd5f3 100644 --- a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java +++ b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java @@ -49,22 +49,22 @@ public class ItemThermalContainer extends Item implements IThermalContainerItem if (arg0.getTagCompound() == null) { arg0.stackTagCompound = new NBTTagCompound(); } - int arg3 = arg0.stackTagCompound.getInteger("Energy"); + int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy"); int arg4 = Math.min(this.capacity - arg3, Math.min(this.maxReceive, arg1)); if (!arg2) { arg3 += arg4; - arg0.stackTagCompound.setInteger("Energy", arg3); + arg0.stackTagCompound.setInteger("ThermalEnergy", arg3); } return arg4; } public int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2) { - if (arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("Energy")) { - int arg3 = arg0.stackTagCompound.getInteger("Energy"); + if (arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy")) { + int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy"); int arg4 = Math.min(arg3, Math.min(this.maxExtract, arg1)); if (!arg2) { arg3 -= arg4; - arg0.stackTagCompound.setInteger("Energy", arg3); + arg0.stackTagCompound.setInteger("ThermalEnergy", arg3); } return arg4; } else { @@ -72,9 +72,9 @@ public class ItemThermalContainer extends Item implements IThermalContainerItem } } - public int getEnergyStored(ItemStack arg0) { - return arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("Energy") - ? arg0.stackTagCompound.getInteger("Energy") + public int getThermalEnergyStored(ItemStack arg0) { + return arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy") + ? arg0.stackTagCompound.getInteger("ThermalEnergy") : 0; } -- cgit