[Feature request] Make rituals match/ignore NBT data on an item-by-item basis?
mrnos opened this issue ยท 2 comments
I'm trying to make monster spawners craftable through an infusion recipe, where some ingredients need to match NBT and some need to ignore NBT.
The recipe is as follows right now:
mods.abyssalcraft.InfusionRitual.addRitual("mob_spawner",
2,
-1,
20000,
false,
<minecraft:mob_spawner>,
<abyssalcraft:interdimensionalcage>.withTag({PotEnergy: 1000.0 as float}),
[
<botania:gravityrod>,
<minecraft:iron_bars>,
<abyssalcraft:oc>,
<minecraft:iron_bars>,
<abyssalcraft:statue:*>,
<minecraft:iron_bars>,
<botania:floatingspecialflower>.withTag({type: "loonium"}),
<minecraft:iron_bars>
],
true)
This recipe will never work as is for the following reasons:
- I want to require the Interdimensional Cage to have 1,000 PE, and require the Botania flower to be a Loonium; both require matching by NBT (otherwise, ignoring NBT allows any interdimensional cage and any floating special flower work, which I don't want).
- But the Botania gravityrod, once crafted, changes its NBT data every tick, so for this recipe to work at all, the gravityrod needs to have its NBT data ignored.
Right now, my desired behavior appears impossible; NBT matching is all-or-nothing as configured by a single flag at the end.
Would something like CraftTweaker's onlyWithTag feature be feasible?
If this isn't practicable to solve, I can always make a different recipe for my pack. But this would be nice to have.
The NBT checking is currently done in the same fashion as onlyWithTag, except the case where the recipe Item doesn't have NBT but the input Item does isn't handled properly (since this should evaluate to true as under that circumstance the input Item NBT still "contains" the recipe Item NBT).
Fixed in Shinoow/AbyssalCraft@c8c2dca and 1baf328