#Non-Vanilla enchantment levels
1 messages · Page 1 of 1 (latest)
No, you'll need to nbt edit a structure
My current fix is syphoning from a block inventory, but I'd rather not
I had an idea about using NBTs
async function kit11(player) {
system.run(() => {
const inv = player.getComponent('inventory').container;
const sword = JSON.parse(`{"Count":1b,"Damage":0s,"Name":"minecraft:golden_sword","WasPickedUp":0b,"tag":{"display":{"Name":"§r§a§lTest Name§r"},"ench":[{"id":17s,"lvl":5s}]}}`);
//sword.nameTag = '§iKit Item';
inv.addItem(sword);
})};
sort of like this
what
?
That does not work FYI
Parsing NBT to the game isn't possible by ScriptAPI
Good to know.
What if I made my own custom form of NBT? I've done something similar before for an entire inventory NBT
(I don't mean an actual NBT, just a data storage system to save and load items)
load item? as itemStack or just data to do certain custom action
This saves and loads the item. It copies the data in each slot of the inventory and clears the inventory. When the inventory is loaded, all slots (armor, offhand, hotbar, inventory) get their saved items loaded back with durability, data, name, count, and vanilla level enchants
I just to find some way to get higher level enchantment compatability
External some data from an Item won't get saved tho.
- Inventory - Shulkerboxes
- ItemStack DynamicProperty - ScriptAPI
You're right. Those things won't be saved at the moment.
I didn't list those, either. The goal at the moment is to get higher level enchantments.
Well, you can't add an enchantment level higher than the vanilla. But you can Remove an enchantment on an item regardless of level.
So theoretically, you can have an NBT-edited item with a list of illegal enchantments, and then remove the enchantment that's not needed.
@earnest lily You're better off saving a chest with items that have a higher enchant level
Like if it's swords with sharpness 1 - 27
U can save it as a structure, load the structure, then grab the block
I'll use block syphoning for now
by copying the item from a block with the higher level enchanted item