Open GoatGamerHUN opened 11 months ago
Nutrients are defined by item tags, so either the cake item or one or more of its crafting ingredients need to be tagged. Also, the block has to be defined as an instance of the CakeBlock class. Otherwise, Nutritional Balance doesn't know you just clicked on an edible block.
If Tinkers' cakes work, then the above conditions have been met. I haven't done anything on my end to explicitly add compatibility for them.
Do the Farmer's Delight cheesecakes act like cake blocks where you just right click them and instantly consume a portion, or do you right click with a bowl, and then eat from the bowl like many other Farmer's Delight foods? If the former, then the cheesecake item needs to be tagged. If the latter, then the cheesecake bowl item that you actually eat has to be tagged.
Ahh, I see. How can I manually assing the CakeBlock class to a placeable food item? Is it a tag too?
It's defined in the code. I just checked the Farmer's Delight source, and they are not inheriting CakeBlock or triggering any events to hook into. Unfortunately, that means it's not possible for NB to detect this. I'll need to figure out a workaround for this, though I'm not exactly sure what that would be at the moment. One big problem is that it is also possible to cut a slice from the cheesecake with a knife, so I can't just hook into the right click event like I do with regular cake.
If I'm being correct, manually applying nutrient to placed blocks has no effect. For example, Tinkers' cakes have built-in compat and so they work. However, those that aren't compatible by default can't be made to have nutrients. For example, Sweet Berry Cheesecake from Farmer's Delight. Let's say I applied the "carbs" nutrient. It simply doesn't work.
My game version is 1.18.2, but I presume the situation is the same with all versions.