#(giornobanana) How to change the max durability on an custom item

43 messages · Page 1 of 1 (latest)

median barn
#

Hi i'm making a custom pickaxe right now and i want to change the duration of the pickaxe to 20. But when i change the mechanism it doesn't work and stay at 250 (for an iron pickaxe)

pliant patrolBOT
#

(giornobanana) How to change the max durability on an custom item

pliant patrolBOT
#

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.

fiery widget
#

!haste

rose sedgeBOT
fiery widget
#

Don't raw paste it.

#

Discord formatting breaks it.

median barn
#

here sorry

formal niche
#

!m max_damage

rose sedgeBOT
#
Possible Confusion

Did you mean to search for damage?

#
Possible Confusion

Did you mean to search for command animate?

rose sedgeBOT
# formal niche !m max_damage
Cannot Specify Searched Mechanism

Multiple possible mechanisms: EntityTag.damage, EntityTag.damage_item, PlayerTag.flying_fall_damage, EntityTag.no_damage_duration, EntityTag.max_no_damage_duration.

#
Possible Confusion

Did you mean to search for command image?

formal niche
#

Cant find max_damage

#

Are y using ai?

#

!m durability

rose sedgeBOT
#
Possible Confusion

Did you mean to search for durability?

rose sedgeBOT
# formal niche !m durability

Changes the durability of damageable items.

Object

ItemTag

Input

ElementTag(Number)

Tags

<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...

formal niche
#

@median barn i dont think you can change item's max durability

#

Maybe flag the item with durability flag

rose sedgeBOT
wraith hedge
#

Max_damage is a component that was added to items, this can be applied through

formal niche
wraith hedge
#

!m components_patch

rose sedgeBOT
# wraith hedge !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.

Group

Properties

**WARNING**

Due to this being a direct representation of internal data, compatibility for script usage across versions is not guaranteed.

Object

ItemTag

Input

MapTag

Tags

<ItemTag.components_patch> (Property) Returns the item's internal component patch. That is, the ch...

formal niche
#

Well im outdated ig

wraith hedge
#

!l raw nbt encoding

rose sedgeBOT
# wraith hedge !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

Group

Useful Lists

wraith hedge
#

Max_damage is an integer, so you would use the int: prefix in this case

median barn
#

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 ?

wraith hedge
#

Yep

median barn
#

Should i write this .

#

?

#

because it doesn't seem to work

median barn
#

ok nevermind i got it i was missing the rules