mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-13 17:04:10 +00:00
close container if parent item is gone (#45)
This commit is contained in:
1 parent
db796ae830
commit
3809971825
1 file changed
+11
+11
@@ -45,6 +45,17 @@ public class ContainerIchorPouch extends ContainerPlayerInv {
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
if (!player.worldObj.isRemote) {
|
||||
if (player.getCurrentEquippedItem() != pouch) {
|
||||
player.closeScreen();
|
||||
return;
|
||||
}
|
||||
}
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int slot) {
|
||||
if (slot == blockSlot) return null;
|
||||
|
||||
Reference in new issue
Block a user