From ca37ac2bf7b9d402f2864e98fc8cb7cff0f28a3a Mon Sep 17 00:00:00 2001 From: YHDiamond Date: Tue, 11 Jun 2024 16:23:33 -0400 Subject: [PATCH] Fix not showing attributes for "Armor" category --- .../geysermc/geyser/translator/item/ItemTranslator.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/geysermc/geyser/translator/item/ItemTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/item/ItemTranslator.java index 948f9c1a07d..9a75c42ae63 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/item/ItemTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/item/ItemTranslator.java @@ -214,7 +214,13 @@ private static void addAttributeLore(ItemAttributeModifiers modifiers, BedrockIt } ItemAttributeModifiers.EquipmentSlotGroup slotGroup = entry.getSlot(); - if (slotGroup == ItemAttributeModifiers.EquipmentSlotGroup.ANY) { + if (slotGroup == ItemAttributeModifiers.EquipmentSlotGroup.ARMOR) { + // modifier applies to all armor slots + slotsToModifiers.computeIfAbsent(ItemAttributeModifiers.EquipmentSlotGroup.HEAD, s -> new ArrayList<>()).add(loreEntry); + slotsToModifiers.computeIfAbsent(ItemAttributeModifiers.EquipmentSlotGroup.CHEST, s -> new ArrayList<>()).add(loreEntry); + slotsToModifiers.computeIfAbsent(ItemAttributeModifiers.EquipmentSlotGroup.LEGS, s -> new ArrayList<>()).add(loreEntry); + slotsToModifiers.computeIfAbsent(ItemAttributeModifiers.EquipmentSlotGroup.FEET, s -> new ArrayList<>()).add(loreEntry); + } else if (slotGroup == ItemAttributeModifiers.EquipmentSlotGroup.ANY) { // modifier applies to all slots implicitly for (var slot : SLOT_NAMES.keySet()) { slotsToModifiers.computeIfAbsent(slot, s -> new ArrayList<>()).add(loreEntry);