Fix container owner reset on close
This commit is contained in:
parent
3a1700a608
commit
1f5b6aea97
|
@ -728,9 +728,10 @@ 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) {
|
||||
var old = ArclightCaptures.getContainerOwner();
|
||||
ArclightCaptures.captureContainerOwner((ServerPlayer) (Object) this);
|
||||
CraftEventFactory.handleInventoryCloseEvent((ServerPlayer) (Object) this);
|
||||
ArclightCaptures.resetContainerOwner();
|
||||
ArclightCaptures.captureContainerOwner(old);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user