Skip to content

Add ability to consume GT Food to Gourmaryllis#128

Open
Yoshy2002 wants to merge 3 commits intomasterfrom
gourmaryllisGTFood
Open

Add ability to consume GT Food to Gourmaryllis#128
Yoshy2002 wants to merge 3 commits intomasterfrom
gourmaryllisGTFood

Conversation

@Yoshy2002
Copy link
Copy Markdown

@Yoshy2002 Yoshy2002 commented Mar 15, 2026

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

@Nikolay-Sitnikov
Copy link
Copy Markdown

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.

@Yoshy2002
Copy link
Copy Markdown
Author

What exactly looks not "relatively reasonable"?
image

@Yoshy2002 Yoshy2002 requested a review from a team March 16, 2026 22:47


compileOnly("com.github.GTNewHorizons:StructureLib:1.4.32:dev")
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.362:dev")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are metaitems so they cannot extend ItemFood. It's not an interface.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Four says, its impossible for them to implement ItemFood, due to them being metaitems. That should "disprove" your argument enough.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This belongs to a different feature not attributed in the MR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gourmaryllis not accept food under gregtech

4 participants