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 10 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 Juice drinks should be placed in a sub-tag, such as #c:drinks/coffee, #c:drinks/tea, and #c:drinks/juice.

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

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:drink_containing/bucket tags.

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 items that are only water (empty)
  • #c:drinks/watery for items that are generally water (potions, introduced as comprise for the weirdness with how the water bottle is a potion, but potions shouldn't really be "water")
  • #c:drinks/milk for drinkable milk items (milk bucket)
  • #c:drinks/honey for drinkable honey items (honey bottle) - a weird one since honey provides nutrition and saturation. 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, and does meet the definition of a drink. 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 magical drinks that grant Bad Omen (ominous bottle)
  • #c:drinks/juice for all plant-based juices (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.

@TheDeathlyCow
Copy link
Author

Done. However, I kept the beet root juice translation as "Beet Juice" just because it seemed like a better name for a juice than Beetroot.

@JTK222
Copy link
Contributor

JTK222 commented Feb 9, 2025

I am not very involved in the nature of common tags, but I am not a fan of the tags as proposed here.

Based on the use cases noted in the attached issue, I believe tags like:
drinks/warming, drinks/cooling, drinks/hydrating, drinks/dehydrating would be way better suited.

Going with functional tags like in vanilla MC, rather than just having tags for the sake of having tags.
If two mods add carrot juice, well... first of congratulation on finding two mods doing that.
Second, it's easy enough for a modpack author to resolve this in potential recipes.
I do not believe that having such specific tags for the sake of having them is worth it.

@TelepathicGrunt
Copy link
Contributor

TelepathicGrunt commented Feb 9, 2025

@JTK222 c tags are more categorization more often than functionality. Mods can utilize the categories for their functionality. For example, rather than say a c:drinks/warming tag where the drinks in there can only be used for warming behaviors, that isn't useful for mods that wanted a hot_chocolate tag for recipes or for their unhealthy drink behavior. You essentially lock in the tag to only one use case ever and shut out everyone else's. A lot of the item tags are for not just behaviors but recipes too which requires categories instead of functionality. Creating say whisky hot chocolate from hot chocolate will require a hot chocolate tag for the recipe. Turning any warming tag drinks into whisky hot chocolate would be awkward

@IchHabeHunger54
Copy link
Member

Personally, I have a use case for "all items that are bottles or bottle-like". If we can get that in (which, in this scenario, mainly means the drink_containing tags), I'm all for it. I have no opinions on the categorization of the drink "contents", if that makes any sense.

@TheDeathlyCow
Copy link
Author

@JTK222 Thanks for the feedback! Do you think just simply removing the apple/carrot/beet/etc juice flavour sub-sub tags (but keep the javadoc saying to do that if necessary) would be sufficient? I do know that no tag currently in common or in vanilla used such specificity, so I somewhat agree that it may be too much for an API such as Fabric or NeoForge to include (but could still be a useful convention for food overhaul mods like Farmer's Delight, especially in crafting).

And also maybe to add on to what @TelepathicGrunt said, these tags are more for categories than specific functionality. For functionality, I do define my own tags in my own namespace, for example I have this warm foods tag in Frostiful:

https://github.com/TheDeathlyCow/frostiful/blob/1.21.1/src/main/resources/data/frostiful/tags/item/warm_foods.json

However, the problem that I am trying to solve here is that the lack of conventional drink tags means it's rather difficult to maintain tags like this warming tag. Most of its entries are drinks like Tea or Hot Chocolate, which have no conventional tag to reference. So instead, I must add optional entries for every single individual item I want to integrate this mechanic with by default. By making this a conventional tag the modded items which add these sorts of beverages can be more or less automatically picked up. Essentially, it becomes a bug report on the person who added hot chocolate, not on me.

@TheDeathlyCow
Copy link
Author

@IchHabeHunger54 I do think there is a subtle different between bottle items, and drink containing bottle items. Drink containing bottles must be themselves drinkable, so empty glass bottles (which do not contain a drink), Bottles O' Enchanting, Dragon's Breath, and arguably Splash Potions and Lingering Potions are all out. This is strictly for the drinkable bottles like regular potions, honey bottles, and ominous bottles.

@JTK222
Copy link
Contributor

JTK222 commented Feb 9, 2025

TelepathicGrunt went a bit more into detail in Discord for me.
As it seems categorizing tags are more of a standard already, even if I believe that using tags like drinks/tea would not be great for functionality. (What about ice tea, should be in the tea tag, but will likely be cold)
However, it's already a standard therefore I withdraw my complaints.

@KnightMiner
Copy link
Contributor

I do think you raised a good point though. Tags should be used to mark behaviors that people want in their mods. If no one is asking for drink tags, we can't possibly make useful drink tags for them.

In general, we want people who are using the tags to clarify what they want the tags for to produce useful tags. If someone wants to use "warming"/"cooling" drinks, then they should request such tags be added.

@IchHabeHunger54
Copy link
Member

@TheDeathlyCow oh, I don't disagree. It just would be beneficial for my use case to have the drinkable bottles tag, to whatever extent. I obviously need to include empty bottles and the like anyway, so I need a custom tag regardless. It would just make my life a bit easier.

@TheDeathlyCow
Copy link
Author

@KnightMiner Yeah there are a few tags in the convention that do deal with behaviours, but I think warming and cooling are something very highly specific to my mod so I chose not to include such tags here. Warming and cooling can also extend into foods like spicy foods and ice cream. It isn't necessarily exclusive to drinks (though drinks may its most common form).

But, I think there could be room for more general tags for drink properties - like #c:drinks/iced, #c:drinks/hot, and #c:drinks/alcoholic. What do you think?

@KnightMiner
Copy link
Contributor

Personally, I have no use for such tags. My only concern is that every tag added to Neo is one I'm expected to support in my mods, which is extra work. I want to ensure the tags that are added are ones that will actually be used so that extra work is not for nothing.

I am never against tagging my stuff if requested by another mod. Tagging just to keep up with Neo always concerns me a bit if I can't describe what the tag actually does, as then I'm not sure if I'm correctly tagging it.

@TheDeathlyCow
Copy link
Author

TheDeathlyCow commented Feb 10, 2025

I am never against tagging my stuff if requested by another mod. Tagging just to keep up with Neo always concerns me a bit if I can't describe what the tag actually does, as then I'm not sure if I'm correctly tagging it.

I think that's a valid consideration. Mods can always define more tags if needed - the important thing here is that a basic standard for creating these drink tags is documented in Fabric and Neo so this is done consistently. If I need a hot/iced/alcoholic tag for my mods I can either just add them into my mod (and ask other mods to use them), or make a separate PR here for them.

So, I decided to just remove the juice sub sub tags, and added a note in javadoc for how mods should add them back if desired. I still kept the base juice tag even though it's empty, because it's a fairly common drink category in mods from what I've seen. I also made a slight adjustment to the drinks java doc regarding tagging alcoholic drinks. @TelepathicGrunt @KnightMiner would you be kind enough to leave a review and maybe this can be merged?

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.

8 participants