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

Convention drink tags #1853

Open
TheDeathlyCow opened this issue Jan 14, 2025 · 10 comments
Open

Convention drink tags #1853

TheDeathlyCow opened this issue Jan 14, 2025 · 10 comments
Labels
enhancement New (or improvement to existing) feature or request

Comments

@TheDeathlyCow
Copy link

TheDeathlyCow commented Jan 14, 2025

Copied from Fabric API issue: FabricMC/fabric#4378

This is a request to add new conventional item tags for drinks. There are a couple tags already for this, namely #c:buckets/milk, #c:potions, and #c:potions/bottle. However, many mods like Farmer's Delight (and its many add-ons), Let's Do (a whole series of mods, many of which add drinks), Brewery, and Dehydration (just to name a few) also add drinks of their own that often do not fall under vanilla categories. I would like Fabric API to add a new drinks subfolder of tags with greater depth for drinks, similar to the foods tags, though most of these tags would be empty.

Here are some of the tags I would like to see, but I would like to get input on what further tags could be added (since there are probably a few I am missing here):

  • #c:drinks for all drinks (similar to #c:foods)
  • #c:drinks/water for drinks that are mostly water - including potions and ominous bottles (potentially).
  • #c:drinks/milk for milk
  • #c:drinks/coffee for coffee
  • #c:drinks/caffeinated for drinks that provide caffeine, including coffee and energy drinks
  • #c:drinks/tea for tea
  • #c:drinks/hot_chocolate for hot chocolate/hot cocoa
  • #c:drinks/smoothie for milk shakes and smoothies
  • #c:drinks/juice for all juices
  • #c:drinks/soda for all sodas
  • There could be more, but at least creating this folder should set a standard that makes it easier for mod authors to add more drinks of their own.

I'd also propose adding tags for alcoholic drinks. However, this may be difficult to add given Minecraft's age rating/usage policy. Regardless, there are many mods out there for brewing and alcoholic drinks, so I still think this would be a worthwhile inclusion.

  • #c:drinks/alcohol for all alcoholic drinks
  • #c:drinks/alcohol/wine for all wines, including mead
  • #c:drinks/alcohol/beer for all beers and ales
  • #c:drinks/alcohol/cider for all ciders
  • #c:drinks/alcohol/cocktail for all cocktails
  • #c:drinks/alcohol/spirit for all spirits like rum, tequila, and vodka.

My Personal Use Case

I am working on a thirst mod addon for my temperature mods Frostiful and Scorchful (https://github.com/TheDeathlyCow/thirstful/). This mod will focus on adding a lot of effects to these sorts of drinks. For example, quenching thirst (from water, milk, juice, and soda), warming and cooling (coffee, tea, hot cocoa, smoothies), diuretics (caffeine, alcohol), and vasodilation (a faux warming effect caused by drinking alcohol). I would like this thirst mod to be able to work with as many food and drink mods out of the box as possible, without requiring players/mod pack authors to have to manually configure large amounts of tags. My suggestions for tags are mostly based on my ideas for this particular mod, but I have tried to make it as widely applicable as possible. Still, I am very open to further suggestions.

Other Considerations

  • These mods could simply define their own conventional tags for drinks. However, I think this could lead to some deviations between mods/namespace pollution and that inclusion in Fabric API/NeoForge would better standardise this.
  • Drinks could be added to the foods tags, but I think drinks differ from foods in that drinks both use the drink action and do not generally provide nutrition/saturation (that is, they do not have a food component).
@TheDeathlyCow TheDeathlyCow added the enhancement New (or improvement to existing) feature or request label Jan 14, 2025
@TelepathicGrunt
Copy link
Contributor

#c:drinks/water for drinks that are mostly water > - including potions and ominous bottles

Ominous bottle is water??? I wouldn’t think of potions as water either. Just the water bottle and awkward potion as water-like

@TheDeathlyCow
Copy link
Author

Yeah, I'm not 100% sure about that one, to be honest. It just feels like it should go somewhere, and it seems like a potion. However, it appears like it was deliberately excluded from the potions tag because it doesn't use the potion contents component. Perhaps this is a decision that could be separately revisited? To me, the ominous bottle is just a special potion that illagers brewed for the bad omen effect, and the only thing that differentiates it gameplay-wise from other potions is just that it has a different texture.

Also, all potions, including the water bottle, awkward, mundane, and thick potions, are technically assigned to the same potion item and only differentiated by the potion contents component, which is unfortunate for tags since they would not be able to differentiate them. However, all potions are brewed from water/awkward potions, so I assume they could be assigned to a water tag. You could maybe think of it as adding a lime slice to water. Most people would still call it "water", but it just tastes different. Except in this case. the lime is a magical lime that can heal you.

@VoidLeech
Copy link

Just spitballing, would #c:drinks/magic work for Ominous Bottles? Could be interesting to have beneficial, neutral, and harmful subtags as well, mirroring MobEffectCategory.

As for potion, maybe #c:drinks/potion and something like #c:base_drink/x (similar to the #c:ores_in_ground/x and #c:ore_bearing_ground/x tags) for anything that one might use PotionUtils, where 'no effects' means to treat it as you would #c:drinks/x and as #c:drinks/magic otherwise? Would only not work in recipes ig and everyone has to special case it in their code, but I don't think there's a way around that.

@TheDeathlyCow
Copy link
Author

Yes, I think a magic drink tag could work. Perhaps the Ominous Bottle can go in just the magic tag, and Potion can go in both the magic and the water tags.

As for the beneficial/harmful/neutral categories, of course one can always just use the Java methods provided by the game for this. The problem with including them as item tags is that the potion contents component cannot be read by a tag so the potion item would have to belong to all three tags (which would be kinda pointless imo). However, seeing as status effects and potions are each registries of their own, perhaps they could instead be given a separate set of conventional tags? Currently I don't believe Minecraft uses tags for this but I assume if (and when) Mojang refactors that area of the code base to use them, conventional tags will also need to be created.

@TheDeathlyCow
Copy link
Author

Also perhaps there could be some tags to differentiate Iced/Hot Tea, Coffee, and Chocolate. This would be very useful for my specific use case but I fear it may be too many tags for similar things.

@TheDeathlyCow
Copy link
Author

Oh and one more thing: the base drink tags could be a good idea. I already propose using drink/alcohol/* for various alcoholic drink tags. Perhaps there are other drink bases that could be used here (like juice, soda, or tea), or would that be too much?

@KnightMiner
Copy link
Contributor

KnightMiner commented Jan 14, 2025

What about soup? Is soup a drink?

What about slime? My mod adds slime bottles that you can drink, which are arguably protein, so perhaps fall into a similar category as soup.. But they provide effects that might make it closer to magic.


I think for a lot of this its more important to decide on conventions and document them than having the conventions all exist in the Tags class in the modloaders. That is, be clear exactly what qualifies as "drink" or "drink/smoothie" so modders know both what they should tag under those, and what assumptions they can make from items in that tag. For instance, are we assuming everything in that tag has a right click "drink" action? Are there any assumptions about Food properties?

@KnightMiner
Copy link
Contributor

Also worth asking, what about sizes of drinks? Potions are in bottles, but I also have buckets of potions which have 4x as much potion. Milk bottles are also fairly common, as are different amounts of caffeination. If your goal is applying effects based on things drunk, you would probably be better off with a data map that allows mods to set numeric values for their drinks than a simple boolean tagging.

You should also look into the mod Diet, which applies food groups to many mods. Author uses his own system that while tag based to start, supports an API for NBT based items along with non-item nutrition sources. He does have the advantage of being able to base his numbers off food properties compared to your goal, but it might still be worth considering as I don't think tags alone will be sufficient for your mod idea (assuming they end up being sufficient in the first place)

@TheDeathlyCow
Copy link
Author

No I don't think soup is a drink - mainly because it provides nutrition through a food component. Also, soups already do have a tag in the food subtags. As mentioned in the issue, I think what differentiates drinks from non-drinks is that drinks use the drink animation and do not generally have a food component.

The Minecraft wiki has a page on drinks with a useful definition for drinks:

Drinks can be distinguished from food by the sounds they make upon consumption and the lack of particles emitted by consuming them. They also do not require the hunger bar to be depleted, and do not affect hunger or saturation values upon use (with the exception of honey bottles, which is considered both a drink and a food item).

https://minecraft.wiki/w/Drinks

Buckets are also weird since only one in vanilla - milk - is actually drinkable. But I agree, perhaps it is better simply to document how drinks should be tagged (perhaps with a few vanilla-based examples), rather than exhaustively list a bunch of empty drink tags.


Also for your comment about Diet, I had heard of it before however it has unfortunately not updated to 1.21.1 (which is the version I'm targeting for Thirstful). This system will also be component based, where the components are assigned based on tags. I'm not so sure whats available here on NeoForge yet but there are mods available on Fabric to modify the components of items from datapacks - so if players do want more fine grained control, they will be able to use that. However if/when Diet does update I will make sure to support it.

@TheDeathlyCow
Copy link
Author

TheDeathlyCow commented Jan 15, 2025

Here is a revised list of tags based on this discussion for consideration. This one is based more on providing examples for standardization rather than listing all drinks. The Javadoc of the tag keys could also be a good place to formally describe these standards. However, I know that I myself don't always look at the javadoc since I don't actually use datagen at all - I usually just look at the rendered tags (though perhaps that is not a good practice on my part haha).

  • #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)
  • #c:drinks/magic for drinks that are magical in nature and give status effects when consumed. includes potions and ominous bottles
  • #c:drinks/juice for all juices (will be empty)

The follow tags demonstrate how to differentiate subtypes of drinks using juices that have a vanilla ingredient

  • #c:drinks/juice/apple
  • #c:drinks/juice/beetroot
  • #c:drinks/juice/carrot
  • #c:drinks/juice/watermelon
  • Edit: #c:drinks/magic/ominous for the ominous bottle may be a useful inclusion as well

I also propose adding drink-containing tags, similar to the ore_rates tag I guess.

  • #c:drink_containing/bucket for all drinkable buckets (milk)
  • #c:drink_containing/bottle for all drinkable bottles (potions, honey bottles, ominous bottles)

There may be a better way to differentiate buckets and bottled drinks. My solution is based on checking combinations like #c:drinks/honey && #c:drink_containing/bucket for drinkable honey buckets.

I'd be happy to make a PR for this both here and in Fabric API, but I know @TelepathicGrunt has their whole system for syncing tags, is there any preference there?

@TheDeathlyCow TheDeathlyCow changed the title Non-vanilla convention drink tags Convention drink tags Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

No branches or pull requests

4 participants