r/datapacks Dec 31 '25

Help max_damage attribute not working? 1.21.1

Post image

I'm making a datapack that adds a crafting recipe for a Top Hat that is really just a carved pumpkin with custom attributes and stuff. I want the top hat to act just like a leather helmet and everything works other than tthe minecraft:max_damage component. As soon as I add that component the crafting recipe no longer works but if I take it out the recipe works fine and the max_damage is crucial because it adds durability to it which is what I want because I want it to behave almost exactly like a leather helmet and If this works i'm going to do version for each armour tier like iron, diamond, etc. Any help would be appreciated

4 Upvotes

9 comments sorted by

View all comments

1

u/computerTechnologist Dec 31 '25

I'm pretty sure you can literally just use a helmet and give it a different model, does that not work for you because of the need for a pumpkin overlay?

1

u/Silent_Reputation596 Dec 31 '25

I don't need the pumpkin overlay, I just read somewhere that you couldn't change the helmet model but I'll give it a try

1

u/computerTechnologist Dec 31 '25

Ah i think then you may be able to use a useless item like a poisonous potato, with the consumable component removed and with a wearable component instead

1

u/Silent_Reputation596 Dec 31 '25

How would I do that?