mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-10-25 20:32:29 +00:00
Fix dropping backpack keeping GUI open (#98)
This commit is contained in:
1 parent
a0f95ee27b
commit
c8d5cf92d2
1 file changed
+24
+24
@@ -43,6 +43,30 @@ public class ContainerIchorPouch extends ContainerPlayerInv {
|
|||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initPlayerInv() {
|
||||||
|
int ys = getInvYStart();
|
||||||
|
int xs = getInvXStart();
|
||||||
|
int held = player.inventory.currentItem;
|
||||||
|
|
||||||
|
for (int x = 0; x < 3; ++x) for (int y = 0; y < 9; ++y)
|
||||||
|
addSlotToContainer(new Slot(player.inventory, y + x * 9 + 9, xs + y * 18, ys + x * 18));
|
||||||
|
|
||||||
|
for (int x = 0; x < 9; ++x) {
|
||||||
|
if (x == held) {
|
||||||
|
addSlotToContainer(new Slot(player.inventory, x, xs + x * 18, ys + 58) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canTakeStack(EntityPlayer p) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addSlotToContainer(new Slot(player.inventory, x, xs + x * 18, ys + 58));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int slot) {
|
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int slot) {
|
||||||
if (slot == blockSlot) return null;
|
if (slot == blockSlot) return null;
|
||||||
|
|||||||
Reference in new issue
Block a user