diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java index b51e9ee..ebf9e56 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java @@ -92,6 +92,7 @@ public class SyncedGuiDescription extends ScreenHandler implements GuiDescriptio this.world = playerInventory.player.world; this.propertyDelegate = propertyDelegate; if (propertyDelegate!=null && propertyDelegate.size()>0) this.addProperties(propertyDelegate); + if (blockInventory != null) blockInventory.onOpen(playerInventory.player); } public WPanel getRootPanel() { @@ -477,6 +478,12 @@ public class SyncedGuiDescription extends ScreenHandler implements GuiDescriptio public boolean canUse(PlayerEntity entity) { return (blockInventory!=null) ? blockInventory.canPlayerUse(entity) : true; } + + @Override + public void close(PlayerEntity player) { + super.close(player); + if (blockInventory != null) blockInventory.onClose(player); + } //} @Override |