aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-12-15 16:11:54 +0100
committerGitHub <noreply@github.com>2021-12-15 16:11:54 +0100
commit128c74faa99dfef8d056c1d82c6e4388b9d470e8 (patch)
tree2c84162154ba681232f86dffd4106db530236814 /src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java
parent47ce336f288a45aa3244c8ae1177499fa5080942 (diff)
parentff4b8c7068c2ea7d654e9beda00646d23e62b314 (diff)
downloadGT5-Unofficial-128c74faa99dfef8d056c1d82c6e4388b9d470e8.tar.gz
GT5-Unofficial-128c74faa99dfef8d056c1d82c6e4388b9d470e8.tar.bz2
GT5-Unofficial-128c74faa99dfef8d056c1d82c6e4388b9d470e8.zip
Merge pull request #65 from GTNewHorizons/unified-build-script2
Move sources and resources
Diffstat (limited to 'src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java')
-rw-r--r--src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java
deleted file mode 100644
index 015e5fd5f3..0000000000
--- a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package gtPlusPlus.api.thermal.sample;
-
-import gtPlusPlus.api.thermal.energy.IThermalContainerItem;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public class ItemThermalContainer extends Item implements IThermalContainerItem {
- protected int capacity;
- protected int maxReceive;
- protected int maxExtract;
-
- public ItemThermalContainer() {
- }
-
- public ItemThermalContainer(int arg0) {
- this(arg0, arg0, arg0);
- }
-
- public ItemThermalContainer(int arg0, int arg1) {
- this(arg0, arg1, arg1);
- }
-
- public ItemThermalContainer(int arg0, int arg1, int arg2) {
- this.capacity = arg0;
- this.maxReceive = arg1;
- this.maxExtract = arg2;
- }
-
- public ItemThermalContainer setCapacity(int arg0) {
- this.capacity = arg0;
- return this;
- }
-
- 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 receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2) {
- if (arg0.getTagCompound() == null) {
- arg0.stackTagCompound = new NBTTagCompound();
- }
- 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("ThermalEnergy", arg3);
- }
- return arg4;
- }
-
- public int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2) {
- 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("ThermalEnergy", arg3);
- }
- return arg4;
- } else {
- return 0;
- }
- }
-
- public int getThermalEnergyStored(ItemStack arg0) {
- return arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy")
- ? arg0.stackTagCompound.getInteger("ThermalEnergy")
- : 0;
- }
-
- public int getMaxThermalEnergyStored(ItemStack arg0) {
- return this.capacity;
- }
-} \ No newline at end of file