#(giornobanana) How to change the max durability on an custom item
43 messages · Page 1 of 1 (latest)
(giornobanana) How to change the max durability on an custom item
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
!haste
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
here sorry
Content of Denizen Script Paste #134593: Custom iron pickaxe... pasted 2025/07/04 09:21:26 UTC-07:00, Paste length: 960 characters across 42 lines, Content: RenforcedIronPickaxe: type: item
!m max_damage
Did you mean to search for damage?
Did you mean to search for command animate?
Did you mean to search for command image?
Did you mean to search for durability?
Changes the durability of damageable items.
ItemTag
ElementTag(Number)
<ItemTag.durability> Returns the current durability (number of uses) on the item.
<ItemTag.max_durability> Returns the maximum durability (number of uses) of this item. For use wit...
<ItemTag.repairable> Returns whether the item can be repaired. If this returns true, it will enabl...
@median barn i dont think you can change item's max durability
Maybe flag the item with durability flag
!knowwhatyouknow
Wrong answers are worse than no answers!
AKA: Know what you know! Short version: Don't answer questions from users if you don't absolutely know the answer for sure. It's much worse than simply waiting for somebody else to answer.
Please read the full writeup on the forum explaining this idea: https://forum.denizenscript.com/threads/public-information-writeup-wrong-answers-are-worse-than-no-answers.264/
Max_damage is a component that was added to items, this can be applied through
Did they change that in revent snapshot
!m components_patch
(Property) Sets the item's internal component patch. That is, the changes in components on top of the item type's default components.
The map is in !language Raw NBT Encoding format.
This is mainly intended for item data persistence, and scripts should prefer using proper item properties instead of setting raw data directly.
If you're trying to control custom data (such as data set by other plugins), use !property ItemTag.custom_data.
Properties
Due to this being a direct representation of internal data, compatibility for script usage across versions is not guaranteed.
ItemTag
MapTag
<ItemTag.components_patch> (Property) Returns the item's internal component patch. That is, the ch...
Well im outdated ig
!l raw nbt encoding
Several things in Minecraft use NBT to store data, such as items and entities.
For the sake of inter-compatibility, a special standard format is used in Denizen to preserve data types.
This system exists in Denizen primarily for the sake of compatibility with external plugins/systems.
It should not be used in any scripts that don't rely on data from external plugins.
NBT Tags are encoded as follows:
CompoundTag: (a fully formed MapTag)
ListTag: list:(NBT type-code):(a fully formed ListTag)
ByteArrayTag: byte_array:(a pipe-separated list of numbers)
IntArrayTag: int_array:(a pipe-separated list of numbers)
ByteTag: byte:(#)
ShortTag: short:(#)
IntTag: int:(#)
LongTag: long:(#)
FloatTag: float:(#)
DoubleTag: double:(#)
StringTag: string:(text here)
EndTag: end
Useful Lists
Max_damage is an integer, so you would use the int: prefix in this case
so i should write this ? :
components_patch:
max_damage:int:20
oh
thanks you so much
and if i want to change the default mining speed wich is in the tool section default_mining_speed ?
Yep
ok nevermind i got it i was missing the rules