#help removing jei/recipe/items by a specific part of their data
36 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
RecipeViewerEvents.removeEntries('item', event => {
event.remove(stack => {
if (stack.id != "tacz:modern_kinetic_gun") return false
let nbt = stack.getCustomData()
let gunId = nbt.get("GunId")
if (gunId == null) return false
if (gunId.getAsString() == "create_armorer:pistol_auto_stress") return true
return false
})
})
@chilly glacier try this
hmm doesnt seeem like its working. no errors but not hiding anything
i probably also if possible want to use #create_armorer if that applies to data like that too
i also need to find the 1.21 way of like full deleting items from crafting too
no, can't use tags
@chilly glacier are you placing this at client_scripts ?
RecipeViewerEvents.removeEntries('item', event => {
event.remove(stack => {
if (stack.id != "tacz:modern_kinetic_gun") return false
console.log("Item is: " + stack.id)
let nbt = stack.getCustomData()
console.log("CustomData is: " + nbt)
let gunId = nbt.get("GunId")
console.log("GunId is: " + gunId)
if (gunId == null) return false
if (gunId.getAsString() == "create_armorer:pistol_auto_stress") return true
return false
})
})
@chilly glacier try now and see if it prints some stuff
oh wait the create one is removed now
thats the exact opposite of what i want to happen
👀
ok so i just add a ! on the last check there and turn it into a list of every create gun?
is getAsString() gonna take a [bunch of things] or no
no
@chilly glacier what do you really want? I'm hiding the Create one
you actually want to show ONLY create?
im looking to show only the ones from create_armorer
MOD or that item specifically?
pistol_auto_stress
@chilly glacier so you want to hide everything but from create_armorer MOD ?
its a mod but all 12 of the guns use that format of the item being just tacz:modern_kinetic_gun and the ids have the actual gun name
so do i wanna uhhh if("create_armorer" in gunId)
or rather if !("create_armorer" in gunId) return true;
answer me
yes everything but from the Create Armorer mod
RecipeViewerEvents.removeEntries('item', event => {
event.remove(stack => {
if (stack.id != "tacz:modern_kinetic_gun") return false
console.log("Item is: " + stack.id)
let nbt = stack.getCustomData()
console.log("CustomData is: " + nbt)
let gunId = nbt.get("GunId")
console.log("GunId is: " + gunId)
if (gunId == null) return false
if (ID.namespace(gunId.getAsString()) != "create_armorer") return true
return false
})
})
@chilly glacier try
works perfect, now i gotta remove the ability to craft all the removed guns