Open Partonetrain opened 6 months 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:
Shift is pressed:
All 3 items in the hotbar are vanilla enchanted books.
The mod is affecting items other than Enchanted Books with CustomModelData. I am using 1.20.1.
I tried again using:
minecraft:diamond_hoe
instead, packed in a resourcepackand 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:
Shift pressed:
Note that I changed the config before starting the game. Could there be an issue (again)?
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)
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:
techreborn:treetap
instead, packed in a resourcepackI gave myself a treetap using the following command:
/give @p techreborn:treetap{CustomModelData:123,Enchantments:[{lvl:1,id:"minecraft:infinity"}]}
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?
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 |
---|---|---|
@Davr1
Thank you for your inputs! I was able to replicate the issue following your steps, and I have identified and fixed the issue locally.
Unfortunately I wasn't able to make a new release in time because of real-life matter. Also I managed to broke the development environment (again). Due to its fragile nature, my current plan is to push the fix for 1.21, 1.20.* and maybe a couple of slightly older versions first, and then backporting fixes once I fix the env.
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.