onEvent('item.tags', event => {
event.get('italian_delight:grape_seeds').add('forge:crops')
// 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')
})
onEvent('item.tags', event => {
event.get('italian_delight:grape_seeds').add('forge:seeds')
})```
This script is not working. I know what's the reason but I wonder whether I can insert an item name instead of a tag. Some items in my pack don't even have a single tag.
~~Ooor is the reason it fails because I try to add two tags at the same time?~~ Actually no it still doesn't work like this.
Is there a workaround for this? Thanks in advance for any help.
Please ping me 🙂
#Add tag to "item" instead of "item with a specific tag"
12 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
event.add('#forge:crops', 'italian_delight:grape_seeds')```
yea I was gonna say you need to flip it
ah thanks I will try that! I keep thinking you pick the target first and then the attachment 😂
think of it like you pick the container first, then what goes into the container. IRL it's much easier to put a thing in a box rather than wrap the box around the thing, if that makes sense
hm so this doesn't add any tags though it also doesn't show errors.
onEvent('item.tags', event => {
// Get the #forge:cobblestone tag collection and add Diamond Ore to it
// event.get('forge:cobblestone').add('minecraft:diamond_ore')
event.add('#forge:crops', 'italian_delight:grape_seeds')
// Get the #forge:cobblestone tag collection and remove Mossy Cobblestone from it
// event.get('forge:cobblestone').remove('minecraft:mossy_cobblestone')
})
onEvent('item.tags', event => {
event.add('#forge:seeds', 'italian_delight:grape_seeds')
// event.get('italian_delight:grape_seeds').add('forge:seeds')
})```did I misunderstand something?
My code that I'm using at the moment omits the # when doing tags. That might be your issue.
event.remove("curios:head", "twilightforest:player_skull_candle")
also chuck both your event.add calls into the same event => {} - you can just interact with the same event as many times as you like
onEvent('tags.items', event => {
event.remove("curios:back", "minecraft:elytra")
event.remove("curios:belt", "toolbelt:belt")
event.remove("curios:head", "twilightforest:moonworm")
event.remove("curios:head", "twilightforest:cicada")
[...]
})