AkvamaroGlacirivero / EnchantIcon

1 stars 1 forks source link

Enchanted item with CustomModelData shows default model when Shift is pressed, regardless of config #5

Open Partonetrain opened 1 month ago

Partonetrain commented 1 month ago

Using Fabric EnchantIcon-1.1.1-13. Regardless of what config options I choose, an item that is enchanted and has CustomModelData NBT data set (and a compatible resourcepack is loaded) will revert to its default model when I press shift.

I understand if this is too much of an edge case to fix, though, haha.

AkvamaroGlacirivero commented 1 month ago

I am unable to reproduce the issue using EnchantIcon-Fabric-1.20.1-1.1.1-13 on Minecraft 1.20.4.

I use the following command to give me an enchanted book:

/give @p minecraft:enchanted_book{CustomModelData:123,StoredEnchantments:[{lvl:10,id:"minecraft:power"}]}

and override enchanted book item model with

{
    "parent": "minecraft:item/generated",
    "textures": {
      "layer0": "minecraft:item/enchanted_book"
    },
    "overrides": [
        {
            "predicate": {
                "custom_model_data": 123
            },
            "model": "minecraft:item/diamond"
        }
    ]
  }

and they show the correct icon when shift is pressed. Do I need to use another item? What version of Minecraft are you using?

Idle: image

Shift is pressed: image

All 3 items in the hotbar are vanilla enchanted books.

Partonetrain commented 1 month ago

The mod is affecting items other than Enchanted Books with CustomModelData. I am using 1.20.1.

AkvamaroGlacirivero commented 1 month ago

I tried again using:

and used the following command to get a diamond hoe with both custom model data and enchantments:

/give @p minecraft:diamond_hoe{CustomModelData:123,Enchantments:[{lvl:10,id:"minecraft:infinity"}]}

yet I am still unable to reproduce the issue.

Shift released:

image

Shift pressed:

image

Note that I changed the config before starting the game. Could there be an issue (again)?

Partonetrain commented 3 weeks ago

Upon further inspection, this only appears to happen with items from namespaces other than minecraft, ie, other mods. (I apologize for the lack of feedback, as you can imagine this has been difficult to debug)

AkvamaroGlacirivero commented 3 weeks ago

image

Thanks for the input! Unfortunately, I am still unable to reproduce the issue. The screenshot above shows 4 tree taps from TechReborn mod in the hotbar.

My environment is now:

I gave myself a treetap using the following command:

/give @p techreborn:treetap{CustomModelData:123,Enchantments:[{lvl:1,id:"minecraft:infinity"}]}
AkvamaroGlacirivero commented 2 weeks ago

Technically speaking, if I ever figured out how to reproduce this issue, it would imply that the fix for GH-4 (clock, compass, etc. stopped changing texture) is not working in some edge cases.

Do you mind sharing your full mod list?

Davr1 commented 23 hours ago

Can confirm that this still happens with vanilla items.

Running Minecraft 1.20.6 with Fabric 0.15.11 and these mods:

You can give yourself an item like the crossbow which has both CustomModelData and supports enchants:

/give @p minecraft:crossbow[minecraft:enchantments={levels:{"minecraft:multishot":1}},minecraft:charged_projectiles=[{count:1,id:"minecraft:arrow"}]]
If you hold shift while it's in the charged state, it will visually revert back to an uncharged state. Scopes must be set to ENCHANTED_BOOK_ONLY or NONE to reproduce this issue default state shift is held
2024-06-30_19 42 48 2024-06-30_19 43 00