strange datapack interaction in 1.21.10 from 1.21.8
so i've been working on a custom food datapack. i got it to work in 1.21.8, but still needed to add a geyser-safe method of eating so i hadn't expanded on it too much yet.
in 1.21.10, the code that worked before is strange now. i didn't do anything to the old code except to update a scoreboard name and change the food item properties.
what it's supposed to do is:
- detect if a player is holding a player head using a fake uuid reserved for a food item (1003000,1003000,1003000,1003000, sweetberry pie). only ones that don't have nbt yet. i found this only worked if i specified an empty name in the check.
- clear exactly 1 of only the nbtless heads.
- replace it with 1 of the food nbt heads, now it looks and behaves like food.
- recurse the function so it only fires if the player is still holding more nbtless heads.
when testing the new geyser eating function, i had to make sure the new properties worked first. but then i ran into a weird problem.
first, it wasn't detecting the heads anymore. i had to take out the empty name field to make it work again.
second, it does a really weird thing. when i receive an empty head with the fake uuid, it starts oscillating between a player head and the custom food model.
third, when i get it to stop doing that, it gives me two of the item now instead of one.
it's not a SUPER big problem because i only put this in as a failsafe kind of thing, to make sure the proper foods were being spawned and so i could be lazy and just be "uhh give player head with uuid" and it'd still have all the nbt. so my pack isn't broken by heads duplicating.
but i want to know why it's doing that. it didn't do that in 1.21.8. it's only doing that in 1.21.10. it seems like a lot of things changed in 1.21.10 and it's not documented anywhere?
attached: the chocolate cake function is from the 1.21.8 pack. the sweetberry pie function is updated for 1.21.10, and is duplicating heads when given a blank head with the right uuid. the recursive check.