From 9599b64ff721f32d8a8ca9be4c136648da0efa82 Mon Sep 17 00:00:00 2001 From: FlorianMichael Date: Sat, 7 Dec 2024 01:34:39 +0100 Subject: [PATCH] Invert operation --- .../viafabricplus/fixes/versioned/ItemPick1_21_3.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/versioned/ItemPick1_21_3.java b/src/main/java/de/florianmichael/viafabricplus/fixes/versioned/ItemPick1_21_3.java index 4efc5b2d..868f1897 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/versioned/ItemPick1_21_3.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/versioned/ItemPick1_21_3.java @@ -88,7 +88,10 @@ public class ItemPick1_21_3 { addBlockEntityNbt(itemStack, blockEntity, client.world.getRegistryManager()); } } - } else if (crosshairTarget.getType() == HitResult.Type.ENTITY && creativeMode) { + } else { + if (crosshairTarget.getType() != HitResult.Type.ENTITY || !creativeMode) { + return; + } final Entity entity = ((EntityHitResult) crosshairTarget).getEntity(); itemStack = entity.getPickBlockStack(); if (itemStack == null) {