#Trying to remove all blocks in a mod from a specific tag

26 messages · Page 1 of 1 (latest)

signal sleet
#

Hey!
I'm trying to remove all plank blocks from the chipped mod from the 'minecraft:planks' tag, I've tried a lot of scripts but I can't seem to think of any that would work.

This is what I'm trying right now:

onEvent('tags.items', event => {
Item.of("@chipped").stacks.forEach((plank) => {
    event.remove('minecraft:planks', plank.id);
});
})

I've also tried:

  • removing the tags from the blocks completely using event.removeAllTagsFrom but that didn't seem to work as well.
  • adding an IF Statement to make sure it's a plank block specifically
fringe widget
#

if you want to use stacks, you have to use Ingredient

#
onEvent('tags.items', event => {
  Ingredient.of('@chipped').itemIds.forEach(plank => {
    event.remove('minecraft:planks', plank)
  })
})
#

Ingredient gets all the items with the filter you give it, while Item takes the first matching item

#

but im pretty sure you can just use regex instead of looking for all the items

#

should be able to just do this

onEvent('tags.items', event => {
  event.remove('minecraft:planks', '@chipped')
})
#

and if that doesnt work, this should

onEvent('tags.items', event => {
  event.remove('minecraft:planks', /^chipped:/)
})
#

@signal sleet :p

signal sleet
#

oh hi, i have tried those yes but I looked here in the server for more scripts but I'll try it once more to make sure nodders

#

didn't work sadly Sadge
Tried the three you sent + tried using the if statement

fringe widget
#

if statement?

#

i also dont really see how it wouldnt work thinking_lex

signal sleet
signal sleet
fringe widget
signal sleet
#

ye i tried it w/o the If statement first but it didn't work

#

i'll try something

#

ah didn't work, tried restarting/reinstalling the mods

fringe widget
#

i have a feeling tags are being added at a different time maybe

#

Chief might know better when he wakes up

marsh tundra
#

that should be working

#

if you swap the event.hide out for a console.log, does it log each of them?

sour waveBOT
#

@signal sleet Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!

signal sleet
#

Oh I'm very sorry I didn't check the server, it does output all @chipped items, yes, including non-plank blocks of course.

If I try and remove them, it doesn't remove any of them though from minecraft:planks/it's crafting recipes, even with an if statement.

sour waveBOT
#

@signal sleet Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!