#give renamed + enchanted item

1 messages · Page 1 of 1 (latest)

small grove
#

Can you explain to me what you want to do?

finite vale
#

Create a new ItemStack("id"); enchant it then give it to the player by retrieving the inventory component and adding it to the inventory.

cursive pivot
tiny drum
#
const item = new ItemStack("id:ominous_crate_key")
item.nameTag = "Crate Key"
const ench = item.getComponent("enchantable")
ench.addEnchantment({ type: "unbreaking", level: 3 })
event.player.getComponent("inventory").container.addItem(item)
finite vale
#

No

rigid fulcrum
#

only with horion and saving the item nbt data via item stack

#

and reloading it

distant vale
#

(just kidding)

gaunt nest
tidal vessel
tiny drum
gaunt nest
#

thx

gaunt nest
#

sorry if I'm bothering you