diff --git a/src/main/java/xyz/devcomp/elytralock/ElytraLock.java b/src/main/java/xyz/devcomp/elytralock/ElytraLock.java index 054951d..03f16c4 100644 --- a/src/main/java/xyz/devcomp/elytralock/ElytraLock.java +++ b/src/main/java/xyz/devcomp/elytralock/ElytraLock.java @@ -20,11 +20,13 @@ public class ElytraLock implements ClientModInitializer { @Override public void onInitializeClient() { + LOGGER.info("Elytra lock initializing!"); + lockKeybind = KeyBindingHelper.registerKeyBinding( new KeyBinding("key.elytralock.lock", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_J, "category.elytralock")); - client = MinecraftClient.getInstance(); + LOGGER.info("Registered keybind for elytra lock"); - LOGGER.info("Elytra lock initializing!"); + client = MinecraftClient.getInstance(); } public static boolean isLocked() { diff --git a/src/main/java/xyz/devcomp/elytralock/mixin/ClientPlayerInteractionManagerMixin.java b/src/main/java/xyz/devcomp/elytralock/mixin/ClientPlayerInteractionManagerMixin.java index 80ef6f3..7ac0844 100644 --- a/src/main/java/xyz/devcomp/elytralock/mixin/ClientPlayerInteractionManagerMixin.java +++ b/src/main/java/xyz/devcomp/elytralock/mixin/ClientPlayerInteractionManagerMixin.java @@ -27,6 +27,8 @@ public class ClientPlayerInteractionManagerMixin { private void skipElytra(PlayerEntity player, Hand hand, CallbackInfoReturnable info, @Local MutableObject mutableObject) { ItemStack itemStack = player.getStackInHand(hand); if (itemStack.isOf(Items.ELYTRA) && ElytraLock.isLocked()) { + ElytraLock.LOGGER.info("Skipping sending PlayerInteractItemC2SPacket for locked elytra"); + mutableObject.setValue(ActionResult.FAIL); info.setReturnValue((ActionResult) mutableObject.getValue()); }