Open Yoghurt4C opened 5 years ago
and the nbt on the item you are throwing onto the plate is...?
ok so obviously the reason why this happens is because the whole "input item must have a superset of nbt tags" thing doesn't extend properly to nested nbt tags lol
trying to find out a better way of comparing the tags
alright:
still having issues with this, tried a bunch of nested nbt variations (like snipping the whole species chromosome:
<forestry:bee_princess_ge>.withTag({Genome: {Chromosomes: [{UID1: "gendustry.bee.Manasteel", UID0: "gendustry.bee.Manasteel", Slot: 0 as byte}]}})
), but it doesn't want to work
I tested a bunch of cases with this smh, I think i have to assume you're not telling zs the NBT tag you think you're telling it
how am I supposed to present the tag to ct?
I was thinking you might have the wrong type somewhere (zen is super loose on types i think).
But actually, come to think of it, probably the array is fucking it up
Your fix doesn't seem to do a superset comparison on list tags.
Oh! Your old solution using NBTTagCompound#merge
doesn't do a superset comparison on list tags either.
This is kind of a weird edge case because to properly do the comparison on ordered lists, you'd need to specify the list indices for the subset of elements you want to match in addition to the elements themselves.
I think a good compromise would be to just assume that all arrays are unordered (just treat them the same as a tag compound). Arrays don't turn up too often on items, and when they do, they usually specify an index somewhere in the tag compound anyways (chests, bees apparently, ...) so you can match on that
...but then matching becomes really fun (match every pair of elements??)
I thought about treating them as unordered but immediately trashed that idea when I remembered how some swedish weirdos use lists to store coordinate triples.
But why would you want to create a recipe that only works with, like, something bound to a specific coordinate lol
Maybe I'm asking for a tool with a wooden handle and an unobtainium large plate and I don't want shrewd players giving me an unobtainium handle with a wooden large plate?
Oh, I just noticed you're iterating over the tags for the input item and then ignoring them if they aren't in the recipe, which means an input item will match a recipe if it has at least as many tags as the recipe but the tag names are all completely different.
Ah, I used to have a counter that tracked how many tags matched, but didn't think I needed it, didn't think of that case
aka bee problems