Capture owner for inv close

This commit is contained in:
IzzelAliz 2022-02-06 15:21:41 +08:00
parent 8f90a71b29
commit d07354e23d
No known key found for this signature in database
GPG Key ID: EE50E123A11D8338

View File

@ -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();
}
}