From 6b24bf5caefed5e7bbc7965cbf253bfd37e72b7d Mon Sep 17 00:00:00 2001 From: dhi_holo <91051135+dhi-holo@users.noreply.github.com> Date: Thu, 22 Oct 2026 18:43:29 +1000 Subject: [PATCH] Wearable Fixes All Wearable Items now can be equipped properly, and render their correct models in the correct contexts. More may be done here in future, but it works and that was the goal --- .../cobblemon/mod/common/CobblemonItems.kt | 42 ++++++++++--------- .../assets/cobblemon/items/black_glasses.json | 17 +++++++- .../assets/cobblemon/items/choice_band.json | 17 +++++++- .../assets/cobblemon/items/choice_specs.json | 17 +++++++- .../assets/cobblemon/items/cleanse_tag.json | 17 +++++++- .../assets/cobblemon/items/covert_cloak.json | 17 +++++++- .../assets/cobblemon/items/exp_share.json | 17 +++++++- .../assets/cobblemon/items/focus_band.json | 17 +++++++- .../cobblemon/items/galarica_wreath.json | 17 +++++++- .../assets/cobblemon/items/kings_rock.json | 17 +++++++- .../assets/cobblemon/items/muscle_band.json | 17 +++++++- .../cobblemon/items/never_melt_ice.json | 17 +++++++- .../assets/cobblemon/items/rocky_helmet.json | 17 +++++++- .../cobblemon/items/safety_goggles.json | 17 +++++++- .../assets/cobblemon/items/sharp_beak.json | 17 +++++++- .../assets/cobblemon/items/shell_helmet.json | 17 +++++++- .../assets/cobblemon/items/spell_tag.json | 17 +++++++- .../items/wearable/black_glasses.json | 6 --- .../cobblemon/items/wearable/choice_band.json | 6 --- .../items/wearable/choice_specs.json | 6 --- .../cobblemon/items/wearable/exp_share.json | 6 --- .../cobblemon/items/wearable/focus_band.json | 6 --- .../cobblemon/items/wearable/kings_rock.json | 6 --- .../cobblemon/items/wearable/muscle_band.json | 6 --- .../items/wearable/rocky_helmet.json | 6 --- .../items/wearable/safety_goggles.json | 6 --- .../items/wearable/wise_glasses.json | 6 --- .../assets/cobblemon/items/wise_glasses.json | 17 +++++++- 28 files changed, 278 insertions(+), 113 deletions(-) delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/black_glasses.json delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/choice_band.json delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/choice_specs.json delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/exp_share.json delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/focus_band.json delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/kings_rock.json delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/muscle_band.json delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/rocky_helmet.json delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/safety_goggles.json delete mode 100644 common/src/main/resources/assets/cobblemon/items/wearable/wise_glasses.json diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/CobblemonItems.kt b/common/src/main/kotlin/com/cobblemon/mod/common/CobblemonItems.kt index 48e51b445e..fc886be967 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/CobblemonItems.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/CobblemonItems.kt @@ -56,6 +56,7 @@ import net.minecraft.resources.ResourceKey import net.minecraft.resources.Identifier import net.minecraft.world.effect.MobEffectInstance import net.minecraft.world.effect.MobEffects +import net.minecraft.world.entity.EquipmentSlot import net.minecraft.world.entity.LivingEntity import net.minecraft.world.food.FoodProperties import net.minecraft.world.item.BlockItem @@ -940,25 +941,24 @@ object CobblemonItems : PlatformRegistry, ResourceKey() - //Wearable items (these items should have a corresponding 3D model) - @JvmField val BLACK_GLASSES = noSettingsItem("black_glasses") - @JvmField val CHOICE_BAND = noSettingsItem("choice_band") - @JvmField val CHOICE_SPECS = noSettingsItem("choice_specs") - @JvmField val EXP_SHARE = noSettingsItem("exp_share") - @JvmField val FOCUS_BAND = noSettingsItem("focus_band") - @JvmField val KINGS_ROCK = blockItem("kings_rock", CobblemonBlocks.KINGS_ROCK) - @JvmField val NEVER_MELT_ICE = blockItem("never_melt_ice", CobblemonBlocks.NEVER_MELT_ICE) - @JvmField val MUSCLE_BAND = noSettingsItem("muscle_band") - @JvmField val ROCKY_HELMET = noSettingsItem("rocky_helmet") - @JvmField val SAFETY_GOGGLES = noSettingsItem("safety_goggles") - @JvmField val WISE_GLASSES = noSettingsItem("wise_glasses") - @JvmField val SHARP_BEAK = noSettingsItem("sharp_beak") - @JvmField val COVERT_CLOAK = noSettingsItem("covert_cloak") - @JvmField val SHELL_HELMET = noSettingsItem("shell_helmet") - @JvmField val GALARICA_WREATH = blockItem("galarica_wreath", CobblemonBlocks.GALARICA_WREATH) - @JvmField val CLEANSE_TAG = blockItem("cleanse_tag", CobblemonBlocks.CLEANSE_TAG) - @JvmField val SPELL_TAG = blockItem("spell_tag", CobblemonBlocks.SPELL_TAG) + // Wearable items (these items should have a corresponding 3D model) + @JvmField val BLACK_GLASSES = wearableItem("black_glasses") + @JvmField val CHOICE_BAND = wearableItem("choice_band") + @JvmField val CHOICE_SPECS = wearableItem("choice_specs") + @JvmField val EXP_SHARE = wearableItem("exp_share") + @JvmField val FOCUS_BAND = wearableItem("focus_band") + @JvmField val KINGS_ROCK = wearableBlockItem("kings_rock", CobblemonBlocks.KINGS_ROCK) + @JvmField val NEVER_MELT_ICE = wearableBlockItem("never_melt_ice", CobblemonBlocks.NEVER_MELT_ICE) + @JvmField val MUSCLE_BAND = wearableItem("muscle_band") + @JvmField val ROCKY_HELMET = wearableItem("rocky_helmet") + @JvmField val SAFETY_GOGGLES = wearableItem("safety_goggles") + @JvmField val WISE_GLASSES = wearableItem("wise_glasses") + @JvmField val SHARP_BEAK = wearableItem("sharp_beak") + @JvmField val COVERT_CLOAK = wearableItem("covert_cloak") + @JvmField val SHELL_HELMET = wearableItem("shell_helmet") + @JvmField val GALARICA_WREATH = wearableBlockItem("galarica_wreath", CobblemonBlocks.GALARICA_WREATH) + @JvmField val CLEANSE_TAG = wearableBlockItem("cleanse_tag", CobblemonBlocks.CLEANSE_TAG) + @JvmField val SPELL_TAG = wearableBlockItem("spell_tag", CobblemonBlocks.SPELL_TAG) // Held Items @JvmField @@ -1604,6 +1604,10 @@ object CobblemonItems : PlatformRegistry, ResourceKey