#give renamed + enchanted item
1 messages · Page 1 of 1 (latest)
Create a new ItemStack("id"); enchant it then give it to the player by retrieving the inventory component and adding it to the inventory.
like instead of /giving item make it give the item to the player already enchanted and with a name
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)
No
bro promoting horion in bedrock addons server xD
(just kidding)
Do you know how lock the item in the hotbar too?
item.lockMode = true
or
item.lockMode = ItemLockMode.inventory
import ItemLockMode
and how do I choose the slot
let slot = 0
item.lockMode = ItemLockMode.slot
inv.setItem(slot, item)
thx
so to summarize how do I make a script that puts a compass in slot 0 of the hotbar in lock mod the first time you enter the world?
sorry if I'm bothering you
Use playerSpawn event