aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/container
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2017-01-20 02:07:40 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2017-01-20 02:07:40 +1000
commita6bb1b33da251f4a2ec7a6d6facb4864e9905341 (patch)
tree84d47440794cadd5c64598355903b123e18e0662 /src/Java/gtPlusPlus/core/container
parent142fe00070526484862f15f3a125400a22a2fe96 (diff)
downloadGT5-Unofficial-a6bb1b33da251f4a2ec7a6d6facb4864e9905341.tar.gz
GT5-Unofficial-a6bb1b33da251f4a2ec7a6d6facb4864e9905341.tar.bz2
GT5-Unofficial-a6bb1b33da251f4a2ec7a6d6facb4864e9905341.zip
+ Added a power cost of 32eu/action for the Tree Farmer. (Will eventually get a config option).
% Moved the internal power buffer variable out of the cut method into the class. % Massive project tidy up, lots of old unused code removed or tidied up. $ Fixed lots of String comparisons that used == instead of .equals(). $ Fixed Double/Triple/Quad null checks in certain places. $ Fixed returns that set values at the same time. $ Swapped 3.14 and 1.57 to Math.PI and Math.PI/2. $ Fixed possible cases where a NPE may be thrown, by calling logging outside of null checks. + Added PI to CORE.java, since it's a double and MC uses it as a float in each instance. - Stripped 95% of the useless code out of Meta_GT_Proxy.java
Diffstat (limited to 'src/Java/gtPlusPlus/core/container')
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_Charger.java81
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_NHG.java102
2 files changed, 0 insertions, 183 deletions
diff --git a/src/Java/gtPlusPlus/core/container/Container_Charger.java b/src/Java/gtPlusPlus/core/container/Container_Charger.java
deleted file mode 100644
index 4b6c43ada6..0000000000
--- a/src/Java/gtPlusPlus/core/container/Container_Charger.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package gtPlusPlus.core.container;
-
-import gtPlusPlus.core.tileentities.machines.TileEntityCharger;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class Container_Charger extends Container
-{
- private TileEntityCharger te;
-
- public static final int INPUT_1 = 0;
-
- private int slotID = 0;
-
- public Container_Charger(TileEntityCharger te, EntityPlayer player)
- {
- this.te = te;
-
- //Fuel Slot A
- addSlotToContainer(new Slot(te, slotID++, 80, 53));
-
-
-
- //Inventory
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 9; j++)
- {
- addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
- // Hotbar
- for (int i = 0; i < 9; i++)
- {
- addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
- }
- }
-
- @Override
- public ItemStack transferStackInSlot(EntityPlayer player, int slotRaw)
- {
- ItemStack stack = null;
- Slot slot = (Slot)inventorySlots.get(slotRaw);
-
- if (slot != null && slot.getHasStack())
- {
- ItemStack stackInSlot = slot.getStack();
- stack = stackInSlot.copy();
-
- if (slotRaw < 3 * 9)
- {
- if (!mergeItemStack(stackInSlot, 3 * 9, inventorySlots.size(), true))
- {
- return null;
- }
- }
- else if (!mergeItemStack(stackInSlot, 0, 3 * 9, false))
- {
- return null;
- }
-
- if (stackInSlot.stackSize == 0)
- {
- slot.putStack((ItemStack)null);
- }
- else
- {
- slot.onSlotChanged();
- }
- }
- return stack;
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer player)
- {
- return te.isUseableByPlayer(player);
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/container/Container_NHG.java b/src/Java/gtPlusPlus/core/container/Container_NHG.java
deleted file mode 100644
index 5fd19489c0..0000000000
--- a/src/Java/gtPlusPlus/core/container/Container_NHG.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package gtPlusPlus.core.container;
-
-import gtPlusPlus.core.tileentities.machines.TileEntityNHG;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.*;
-import net.minecraft.item.ItemStack;
-
-public class Container_NHG extends Container
-{
- private TileEntityNHG te;
-
- public static final int INPUT_1 = 0, INPUT_2 = 1, INPUT_3 = 2,
- INPUT_4 = 3, INPUT_5 = 4, INPUT_6 = 5,
- INPUT_7 = 6, INPUT_8 = 7, INPUT_9 = 8,
- INPUT_10 = 9, INPUT_11 = 10, INPUT_12 = 11,
- INPUT_13 = 12, INPUT_14 = 13, INPUT_15 = 14,
- INPUT_16 = 15, INPUT_17 = 16, INPUT_18 = 17,
- OUTPUT = 18;
-
- private int slotID = 0;
-
- public Container_NHG(TileEntityNHG te, EntityPlayer player)
- {
- this.te = te;
-
-
- //Fuel Rods A
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 3; j++)
- {
- addSlotToContainer(new Slot(te, slotID++, 8 + j * 18, 17 + i * 18));
- }
- }
- //Fuel Rods B
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 3; j++)
- {
- addSlotToContainer(new Slot(te, slotID++, 116 + j * 18, 17 + i * 18));
- }
- }
-
- //Output
- addSlotToContainer(new SlotFurnace(player, te, OUTPUT, 80, 53));
-
- //Inventory
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 9; j++)
- {
- addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
- // Hotbar
- for (int i = 0; i < 9; i++)
- {
- addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
- }
- }
-
- @Override
- public ItemStack transferStackInSlot(EntityPlayer player, int slotRaw)
- {
- ItemStack stack = null;
- Slot slot = (Slot)inventorySlots.get(slotRaw);
-
- if (slot != null && slot.getHasStack())
- {
- ItemStack stackInSlot = slot.getStack();
- stack = stackInSlot.copy();
-
- if (slotRaw < 3 * 9)
- {
- if (!mergeItemStack(stackInSlot, 3 * 9, inventorySlots.size(), true))
- {
- return null;
- }
- }
- else if (!mergeItemStack(stackInSlot, 0, 3 * 9, false))
- {
- return null;
- }
-
- if (stackInSlot.stackSize == 0)
- {
- slot.putStack((ItemStack)null);
- }
- else
- {
- slot.onSlotChanged();
- }
- }
- return stack;
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer player)
- {
- return te.isUseableByPlayer(player);
- }
-} \ No newline at end of file