Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drink Convention Tags #1862

Open
wants to merge 5 commits into
base: 1.21.x
Choose a base branch
from

Conversation

TheDeathlyCow
Copy link

@TheDeathlyCow TheDeathlyCow commented Jan 17, 2025

Original issue: #1853
Fabric PR: FabricMC/fabric#4384

Implements conventional drink tags and documents standards for mods to use when creating further tags, using the following definition of a 'drink' (which is included in the javadoc):

Drinks are defined as (1) consumable items that (2) use the drink use action, (3) can be consumed regardless of the player's current hunger., and (4, optional) do not (generally) have a food component.

Edit: Drinks may provide nutrition and saturation, but are not required to do so.

Documents a standard that categories of drinks, such as Coffee, Tea, or Alcoholic drinks should be placed in a sub-tag, such as #c:drinks/coffee, #c:drinks/tea, and #c:drinks/alcohol.

Specific types of drinks, such as Lattes, Green Tea, and Beer should go in sub-sub-tags using their regular name, such as #c:drinks/coffee/latte, #c:drinks/tea/green_tea, and #c:drinks/alcohol/beer.

Sizes of drinks, such as buckets and bottles, can be distinguished using the #c:drink_containing/* tags. For example, drinkable honey buckets would be all items that belong to #c:drinks/honey AND #c:drinks/bucket.

Something that may be notable about this PR is that if merged, it would be the first use of sub-sub-tags in the convention tags API. Would this be wanted in the API, or would these tags be too granular?

Here is the full list of tags added:

  • #c:drinks for all drinkable items (similar to #c:foods)
  • #c:drinks/water for drinkable water items (potions)
  • #c:drinks/milk for drinkable milk items (milk bucket)
  • #c:drinks/honey for drinkable honey items (honey bottle) - this tag is an exception to the no food component rule (4). However, it is included based on the fact that the Minecraft Wiki categorizes Honey Bottles as both food and a drink: https://minecraft.wiki/w/Drinks. It otherwise meets all of the required rules 1-3 described above. Honey Bottles are also already included in the #c:foods tag, but otherwise have no tag of their own.
  • #c:drinks/magic for drinks that are magical in nature and give status effects when consumed (potions and ominous bottles)
  • #c:drinks/magic/ominous for drinks that grant Bad Omen (ominous bottle)
  • #c:drinks/juice for all juices (empty)
  • #c:drinks/juice/apple (empty)
  • #c:drinks/juice/beetroot (empty)
  • #c:drinks/juice/carrot (empty)
  • #c:drinks/juice/watermelon (empty)
  • #c:drink_containing/bucket for all non-empty drinkable buckets (milk bucket)
  • #c:drink_containing/bottle for all non-empty drinkable bottles (potions, honey bottles, ominous bottles)

@neoforged-automation neoforged-automation bot added the 1.21.4 Targeted at Minecraft 1.21.4 label Jan 17, 2025
@CLAassistant
Copy link

CLAassistant commented Jan 17, 2025

CLA assistant check
All committers have signed the CLA.

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@TelepathicGrunt
Copy link
Contributor

TelepathicGrunt commented Jan 17, 2025

Instead of /water, how about /watery to cover potions a bit better. I still find it weird for water to have potions but at least watery doesn’t explicitly imply 100% water

@TheDeathlyCow
Copy link
Author

Yeah, I think that's a good compromise. Maybe /water could be left empty and only be allowed for items that always contain only water, and /watery would be a superset of water?

@TelepathicGrunt
Copy link
Contributor

(4, optional) do not (generally) have a food component.

should be a bug report to those mods if they have a drink with hunger/saturation and do not use food components. Basically, if they don’t use food components, they surely aren’t going to be tagging correctly too

@Matyrobbrt Matyrobbrt added enhancement New (or improvement to existing) feature or request awaiting community agreement labels Jan 17, 2025
@TheDeathlyCow
Copy link
Author

should be a bug report to those mods if they have a drink with hunger/saturation and do not use food components.

To increase hunger/saturation, do you not need to use a food component? That's what the honey bottle does - though it is the only vanilla drink to do so. Perhaps that rule can just be removed for drinks.

@TelepathicGrunt
Copy link
Contributor

I would expect mods to do better. Food components are great for allowing in-code mod compat to take off so making issue reports to mods to use the components would go a long way. Otherwise if the mods hardcode their behavior in finishedUsing, other mods have no way of know what mob effect or saturation the drink gives.

So while tags are good for recipes overall, in-game compat behaviors needs food components to be utilized more by mods

@TheDeathlyCow
Copy link
Author

Oh yes, I see what you mean now. I had considered that a mod might hardcode nutrition in finishedUsing - but I thought that was too silly of a thing to do that I did not include it in the definition.

@ChiefArug
Copy link
Contributor

ChiefArug commented Jan 17, 2025

Edit: Aaand im 3 minutes late

(4, optional) do not (generally) have a food component

This is only true generally in vanilla. A lot of mods have drinks that give food, so I think including this as a criteria and stating 'generally' is a but much.
I think it is still worth mentioning that it is not required though.

Some examples of drink items pulled from various mods I know of

  • Farmers Delight has 4 drink items, none of which give hunger (however one uses food properties to apply an effect)
  • Create has 1 drink item, which gives some hunger and an effect (however is not on 1.21 yet and does not use food properties for this, see Create#7295)
  • PamsHarvestCraft has 13 drink items all of which give some hunger through food properties.
  • Simply Tea has 7 tea drinks, all of which give some hunger and an effect through food properties.
  • Lets Do: Brewery has 15 alcoholic drinks, all of which give some hunger and an effect with food properties.
  • Lets Do: Vinery has 3 juice drinks, which do not and 23 wine items, which give no hunger but use food properties to give effects.
  • Lets Do: Beach party has 10 drinks which all use food properties to give hunger and effects
  • Create Cafe (1.20.1) has 55 drinks (but only 7 unique food properties) that all use food properties for hunger and effects.

@TheDeathlyCow
Copy link
Author

TheDeathlyCow commented Jan 17, 2025

however one uses food properties to apply an effect

For 1.21.4, the food properties component is no longer responsible for effects - a separate consumable component was created to handle that. In 1.21.1, however, I believe the food component is still responsible for that (as well as the whole consume action in general). So, if a backport of this is made to 1.21.1 then it will likely be the case that most drinks will have a food component. I will remove this as a formal "rule" from the javadoc and add a note explaining that granting nutrition/saturation is not a requirement of drinks, but I will not mention the food component.

Edit:

Edit: Aaand im 3 minutes late

I am a reply fiend

But the mod examples are still very useful thank you.

@ChiefArug
Copy link
Contributor

The beet and watermelon tags should probably use the actual ids, beetroot and melon, as that is what people are used to and what other tags (ie the crop ones) use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.4 Targeted at Minecraft 1.21.4 awaiting community agreement enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants