From b80c054f53069a54b204144175fd771e083deecc Mon Sep 17 00:00:00 2001 From: Eclipse Date: Thu, 12 Dec 2024 13:57:32 +0000 Subject: [PATCH] Fix charge type predicate --- .../geysermc/geyser/translator/item/CustomItemTranslator.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/translator/item/CustomItemTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/item/CustomItemTranslator.java index 8cdca4fc4..b25fe2eed 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/item/CustomItemTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/item/CustomItemTranslator.java @@ -75,7 +75,6 @@ public final class CustomItemTranslator { } Key itemModel = components.getOrDefault(DataComponentType.ITEM_MODEL, MinecraftKey.key("air")); - System.out.println(itemModel + " is the model!"); Collection> customItems = allCustomItems.get(itemModel); if (customItems.isEmpty()) { return null; @@ -111,7 +110,7 @@ public final class CustomItemTranslator { if (match.property() == MatchPredicateProperty.CHARGE_TYPE) { ChargeType expected = (ChargeType) match.data(); List charged = components.get(DataComponentType.CHARGED_PROJECTILES); - if (charged == null) { + if (charged == null || charged.isEmpty()) { return expected == ChargeType.NONE; } else if (expected == ChargeType.ROCKET) { for (ItemStack projectile : charged) {