#How to retrieve all items in a tag and affect all of them except for a specified few
10 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
oh wait hold on
Ingredients.of('#blueprint:wooden_chests').itemIds will retrieve all of those items
now to remove two strings within the array... o_o
will this work in the tags event?
alright so I think I managed to complete this
I'll provide my results later on today
ok I tried the following
ServerEvents.tags('item', event => {
let blueprintChests = Ingredient.of('#blueprint:wooden_chests').itemIds
blueprintChests.forEach(chest => {
if (chest == 'woodworks:crimson_chest' || chest == 'woodworks:warped_chest') return
event.add('ourpack:chests/wooden/regular/overworld', chest)
})
})
and it didn't work nicely D:
Reverting to following code:
event.add('ourpack:chests/wooden/regular/overworld', [
'ars_nouveau:archwood_chest',
'autumnity:maple_chest',
'caverns_and_chasms:azalea_chest',
'environmental:willow_chest',
'environmental:pine_chest',
'environmental:wisteria_chest',
'environmental:plum_chest',
'upgrade_aquatic:driftwood_chest',
'upgrade_aquatic:river_chest',
/^atmospheric:.+_chest$/,
/^woodworks:((?!crimson|warped).)+_chest$/
])