From d07354e23d488b23e47e0146da5be01c542ed77b Mon Sep 17 00:00:00 2001 From: IzzelAliz Date: Sun, 6 Feb 2022 15:21:41 +0800 Subject: [PATCH] Capture owner for inv close --- .../mixin/core/world/entity/player/ServerPlayerMixin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/player/ServerPlayerMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/player/ServerPlayerMixin.java index 9ee34823..101c4b3a 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/player/ServerPlayerMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/player/ServerPlayerMixin.java @@ -724,7 +724,9 @@ public abstract class ServerPlayerMixin extends PlayerMixin implements ServerPla @Inject(method = "doCloseContainer", at = @At("HEAD")) private void arclight$invClose(CallbackInfo ci) { if (this.containerMenu != this.inventoryMenu) { + ArclightCaptures.captureContainerOwner((ServerPlayer) (Object) this); CraftEventFactory.handleInventoryCloseEvent((ServerPlayer) (Object) this); + ArclightCaptures.resetContainerOwner(); } }