aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/gui/GT_Container.java
diff options
context:
space:
mode:
authorboubou_19 <miisterunknown@gmail.com>2021-08-16 20:32:53 +0200
committerboubou_19 <miisterunknown@gmail.com>2021-08-16 20:32:53 +0200
commit8f5dd5625e4632bbecda0771caad47bbbbd35d4c (patch)
tree15d544c783cd17606e6d71259eefc062ba4ea8e5 /src/main/java/gregtech/api/gui/GT_Container.java
parent99030ff940686562c7e4f133919fb1496b0575f4 (diff)
parentc543724aa11d696fa049855e7b330364c1000a17 (diff)
downloadGT5-Unofficial-8f5dd5625e4632bbecda0771caad47bbbbd35d4c.tar.gz
GT5-Unofficial-8f5dd5625e4632bbecda0771caad47bbbbd35d4c.tar.bz2
GT5-Unofficial-8f5dd5625e4632bbecda0771caad47bbbbd35d4c.zip
Merge remote-tracking branch 'upstream/experimental' into experimental
Diffstat (limited to 'src/main/java/gregtech/api/gui/GT_Container.java')
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java
index 608c6015d5..e00759bf24 100644
--- a/src/main/java/gregtech/api/gui/GT_Container.java
+++ b/src/main/java/gregtech/api/gui/GT_Container.java
@@ -142,7 +142,7 @@ public class GT_Container extends Container {
if (aSlot != null && aSlot.canTakeStack(aPlayer)) {
tTempStack = this.transferStackInSlot(aPlayer, aSlotIndex);
if (tTempStack != null) {
- rStack = GT_Utility.copy(tTempStack);
+ rStack = GT_Utility.copyOrNull(tTempStack);
if (aSlot.getStack() != null && aSlot.getStack().getItem() == tTempStack.getItem()) {
slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
}
@@ -157,7 +157,7 @@ public class GT_Container extends Container {
tTempStack = aSlot.getStack();
ItemStack var13 = aPlayerInventory.getItemStack();
if (tTempStack != null) {
- rStack = GT_Utility.copy(tTempStack);
+ rStack = GT_Utility.copyOrNull(tTempStack);
}
if (tTempStack == null) {
if (var13 != null && aSlot.isItemValid(var13)) {
@@ -253,7 +253,7 @@ public class GT_Container extends Container {
} else if (aShifthold == 3 && aPlayer.capabilities.isCreativeMode && aPlayerInventory.getItemStack() == null && aSlotIndex >= 0) {
aSlot = (Slot) this.inventorySlots.get(aSlotIndex);
if (aSlot != null && aSlot.getHasStack()) {
- tTempStack = GT_Utility.copy(aSlot.getStack());
+ tTempStack = GT_Utility.copyOrNull(aSlot.getStack());
tTempStack.stackSize = tTempStack.getMaxStackSize();
aPlayerInventory.setItemStack(tTempStack);
}
@@ -271,7 +271,7 @@ public class GT_Container extends Container {
//null checks and checks if the item can be stacked (maxStackSize > 1)
if (getSlotCount() > 0 && slotObject != null && slotObject.getHasStack() && !(slotObject instanceof GT_Slot_Holo)) {
ItemStack stackInSlot = slotObject.getStack();
- stack = GT_Utility.copy(stackInSlot);
+ stack = GT_Utility.copyOrNull(stackInSlot);
//TileEntity -> Player
if (aSlotIndex < getAllSlotCount()) {