#Non-Vanilla enchantment levels

1 messages · Page 1 of 1 (latest)

earnest lily
#

It seems scripting API won't currently allow adding enchants above the default limit.
Is there a workaround?

cerulean breach
earnest lily
#

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

drifting pond
#

what

earnest lily
cerulean breach
#

That does not work FYI

earnest lily
#

It's an idea.

drifting pond
#

Parsing NBT to the game isn't possible by ScriptAPI

earnest lily
#

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)

drifting pond
#

load item? as itemStack or just data to do certain custom action

earnest lily
#

I just to find some way to get higher level enchantment compatability

drifting pond
#

External some data from an Item won't get saved tho.

  • Inventory - Shulkerboxes
  • ItemStack DynamicProperty - ScriptAPI
earnest lily
#

I didn't list those, either. The goal at the moment is to get higher level enchantments.

drifting pond
#

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.

woeful dust
#

@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

earnest lily
#

by copying the item from a block with the higher level enchanted item

woeful dust
#

Does that require NBT editing?

#

It would be cool to figure out a makeshift way, but I don't think it's possible