From 5d75207b39ef0071d15cffe90dbd224b83d74fc4 Mon Sep 17 00:00:00 2001 From: pietru Date: Tue, 7 Jan 2025 23:25:37 +0100 Subject: [PATCH] fix interactions --- .../net/pietru/cookie_utils/mixins/InteractBlockMixin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pietru/cookie_utils/mixins/InteractBlockMixin.java b/src/main/java/net/pietru/cookie_utils/mixins/InteractBlockMixin.java index b78cd69..1b1fb2b 100644 --- a/src/main/java/net/pietru/cookie_utils/mixins/InteractBlockMixin.java +++ b/src/main/java/net/pietru/cookie_utils/mixins/InteractBlockMixin.java @@ -36,7 +36,9 @@ public class InteractBlockMixin { private void event_block_interact(CallbackInfo ci, @Local NetworkIdentity identity, @Local ChannelHandlerContext ctx){ if (identity.getSide() != NetworkSide.CLIENT) { Account account = ServerSingletons.getAccount(identity); - if (!Permissions.has_user_special_perm(account.getUniqueId()) && !can_edit_block(blockPos,"interact",account.getUniqueId())) { + BlockPosition temp = blockPos.copy(); + temp.convertToLocal(identity.getZone()); + if (!Permissions.has_user_special_perm(account.getUniqueId()) && !can_edit_block(temp,"interact",account.getUniqueId())) { ci.cancel(); MessagePacket packet = new MessagePacket("[Server] " + (is_not_reloading ? "Sorry, but this area is under protection." : "Sorry but you can't do this action right now. [Config Reload In Progress]"));