#Decerease vanilla item durability by 1

1 messages · Page 1 of 1 (latest)

dusky jungle
#

with using any workaround, how can i possibly do this? (vanilla items)

glossy ridge
#

Decerease vanilla item durability by 1

junior kestrel
#

u can use simulated player to do that for u

dusky jungle
#

how can i use simulated player without the structure

junior kestrel
#

just dont use structure

dusky jungle
junior kestrel
#

?

#

look at docs

novel arch
glossy ridge
#

ye

naive sun
#

vanilla item durability is most of times controlled by data value

junior kestrel
naive sun
#

you can change that

junior kestrel
#

i was able to, maybe try empty string

novel arch
#

tried, same

#

it needs structure, there's no way to avoid it

#

i was able to
since when?

junior kestrel
#

1.19.10

#

it spawn that beacon that test but without structure

novel arch
#

might've changed since then
it doesn't seem logical anyways to not to use structure to test...

#

although you can make a 1x1 empty structure and export it, that might work

junior kestrel
#

🤔

novel arch
#

still gonna leave out junks like command block, beacon, the iron base
might need temp area

junior kestrel
#

is there way of empty structure via editing nbt?

novel arch
#

idk, but a 1x1x1 structure with structure void in it is enough

#

what function can be used to damage item in simulated player anyway?

junior kestrel
#

break block or useItem

naive sun
#

get its inventory

#

get specific item stack

#

apply damage

#

and set the item stack to same slot of inventory

novel arch
junior kestrel
#

ya, vanilla items have no damage or durability component

#

so u must use simulated player to simulate use of the item 🥲

novel arch
#

that, or use hasitem selector and find the durability from data

naive sun
novel arch
#

to get the durability, no

#

to set, idk

#

it's gonna be removed anyways, the recent 1.19.70 update removed the data property from itemstack

#

i just tried setting it with data and no luck

naive sun
novel arch
#

yes

dusky jungle
#

hasitem and simulated player might work

#

thx for helping