#EMI | Hiding unwanted enchanted books (World Data Pack Error)

4 messages · Page 1 of 1 (latest)

drowsy plaza
#

Trying to hide all unwanted enchanted books; what am I doing wrong?
startup_scripts

global.disEnchantments = [
    'enderzoology:soulbound',
    'enderio:soulbound',
    'ars_elemental:soulbound',
    'miniutilities:molten_head',
    'miniutilities:shotgun',
    'miniutilities:experience_harvester'
];

server_scripts
-# i am using weakNBT() because books come in multiple levels

ServerEvents.tags('item', event => {
// ENCH REMOVAL    
    global.disEnchantments.forEach(e => {
        console.log(Item.of('minecraft:enchanted_book','{StoredEnchantments:[{id:"'+e+'"}]}').weakNBT());
        event.add('c:hidden_from_recipe_viewers', Item.of('minecraft:enchanted_book','{StoredEnchantments:[{id:"'+e+'"}]}').weakNBT());
    })
})
fathom quiverBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

drowsy plaza
#

bump

oblique halo