Add ability to consume GT Food to Gourmaryllis#128
Conversation
|
Can you please reformat your code to look relatively reasonable? We don't have Spotless enabled on this repository, but that doesn't mean we don't have to keep our code neat. |
src/main/java/vazkii/botania/common/block/subtile/generating/SubTileGourmaryllis.java
Show resolved
Hide resolved
|
|
||
|
|
||
| compileOnly("com.github.GTNewHorizons:StructureLib:1.4.32:dev") | ||
| compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.362:dev") |
There was a problem hiding this comment.
There are several other mods in GTNH that derive food stats. Have you checked what API is being used for that? If there is none, should we allow GTNH commit the sin of being exclusive at the cost of all the other mods?
There was a problem hiding this comment.
The most notable mods that add food to the game imo are
- Pam's
- Natura
- Binnies
Natura and Binnies both extend ItemFood, so they get caught by the first check and get consumed ingame. When checking ingame, Pam's food also gets consumed, so I suppose they also extend ItemFood.
So I don't see any "exclusiveness" for GT Food, i just see them being treated the same as the other food.
If im misunderstanding your question, please correct me.
There was a problem hiding this comment.
What I'm postulating is that the real bug is actually that GregTech foods do not implement ItemFood, and this merge request is a poor man's excuse for not fixing the root cause of the problem.
That is the argument that you have to disprove.
There was a problem hiding this comment.
They are metaitems so they cannot extend ItemFood. It's not an interface.
There was a problem hiding this comment.
As Four says, its impossible for them to implement ItemFood, due to them being metaitems. That should "disprove" your argument enough.
There was a problem hiding this comment.
It does not change the conclusion that GregTech broke compatibility on its own volition by refusing to use ItemFood (and yes I'm aware that migration from one item to another is going to be annoying) and therefore it should normally carry the burden of responsibility.
The other question is also yet unanswered: how do all the other food-related mods interoperate with gregtech foods? There's at least spice of life and a NEI integration that also know how to obtain the food value.
| super.writeToPacketNBT(cmp); | ||
| cmp.setInteger(TAG_COOLDOWN, cooldown); | ||
| cmp.setInteger(TAG_COOLDOWN, cooldown); | ||
| cmp.setInteger(TAG_STORED_MANA, storedMana); |
There was a problem hiding this comment.
This belongs to a different feature not attributed in the MR

as title says, lets Gourmaryllis consume GT Food, which is not of type ItemFood.
Unsure if this is the correct way to implement soft dep on gt5, but tested in full gtnh and it works like a charm.
Also fixed a small bug(i believe?) which i stumbled across, where TAG_COOLDOWN was stored twice instead of TAG_COOLDOWN and TAG_STORED_MANA.
closes GTNewHorizons/GT-New-Horizons-Modpack#23780