TagEventJS
This event is fired when a tag collection is loaded, to modify it with script. You can add and remove tags for items, blocks, fluids and entity types.
Parent class
Can be cancelled
No
Variables and Functions
TagWrapper class
Variables and Functions
Examples
// Listen to item tag event
events.listen('item.tags', function (event) {
// Get the #forge:cobblestone tag collection and add Diamond Ore to it
event.get('forge:cobblestone').add('minecraft:diamond_ore')
// Get the #forge:cobblestone tag collection and remove Mossy Cobblestone from it
event.get('forge:cobblestone').remove('minecraft:mossy_cobblestone')
})
Recipes use item tags, not block or fluid tags, even if items representing those are blocks. Like minecraft:cobblestone even if it's a block, it will still be an item tag for recipes.