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 6 commits into
base: 1.21.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/generated/resources/assets/c/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,20 @@
"tag.item.c.crops.pumpkin": "Pumpkin Crops",
"tag.item.c.crops.sugar_cane": "Sugar Cane Crops",
"tag.item.c.crops.wheat": "Wheat Crops",
"tag.item.c.drink_containing.bottle": "Drink Containing Bottles",
"tag.item.c.drink_containing.bucket": "Drink Containing Buckets",
"tag.item.c.drinks": "Drinks",
"tag.item.c.drinks.honey": "Honey",
"tag.item.c.drinks.juice": "Juice",
"tag.item.c.drinks.juice.apple": "Apple Juice",
"tag.item.c.drinks.juice.beetroot": "Beet Juice",
"tag.item.c.drinks.juice.carrot": "Carrot Juice",
"tag.item.c.drinks.juice.melon": "Melon Juice",
"tag.item.c.drinks.magic": "Magical Drinks",
"tag.item.c.drinks.magic.ominous": "Ominous Drinks",
"tag.item.c.drinks.milk": "Milk",
"tag.item.c.drinks.water": "Water",
"tag.item.c.drinks.watery": "Watery Drinks",
"tag.item.c.dusts": "Dusts",
"tag.item.c.dusts.glowstone": "Glowstone Dusts",
"tag.item.c.dusts.redstone": "Redstone Dusts",
Expand Down
15 changes: 15 additions & 0 deletions src/generated/resources/data/c/tags/item/drinks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"values": [
"#c:drinks/water",
"#c:drinks/watery",
"#c:drinks/milk",
"#c:drinks/honey",
"#c:drinks/magic",
"#c:drinks/magic/ominous",
"#c:drinks/juice",
"#c:drinks/juice/apple",
"#c:drinks/juice/beetroot",
"#c:drinks/juice/carrot",
"#c:drinks/juice/melon"
]
}
5 changes: 5 additions & 0 deletions src/generated/resources/data/c/tags/item/drinks/honey.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:honey_bottle"
]
}
8 changes: 8 additions & 0 deletions src/generated/resources/data/c/tags/item/drinks/juice.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"values": [
"#c:drinks/juice/apple",
"#c:drinks/juice/beetroot",
"#c:drinks/juice/carrot",
"#c:drinks/juice/melon"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"values": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"values": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"values": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"values": []
}
6 changes: 6 additions & 0 deletions src/generated/resources/data/c/tags/item/drinks/magic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"values": [
"minecraft:potion",
"#c:drinks/magic/ominous"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:ominous_bottle"
]
}
5 changes: 5 additions & 0 deletions src/generated/resources/data/c/tags/item/drinks/milk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:milk_bucket"
]
}
3 changes: 3 additions & 0 deletions src/generated/resources/data/c/tags/item/drinks/water.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"values": []
}
6 changes: 6 additions & 0 deletions src/generated/resources/data/c/tags/item/drinks/watery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"values": [
"minecraft:potion",
"#c:drinks/water"
]
}
52 changes: 52 additions & 0 deletions src/main/java/net/neoforged/neoforge/common/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,58 @@ public static class Items {
public static final TagKey<Item> CROPS_PUMPKIN = tag("crops/pumpkin");
public static final TagKey<Item> CROPS_SUGAR_CANE = tag("crops/sugar_cane");
public static final TagKey<Item> CROPS_WHEAT = tag("crops/wheat");

/**
* Drinks are defined as (1) consumable items that (2) use the
* {@linkplain net.minecraft.world.item.ItemUseAnimation#DRINK drink item use animation}, (3) can be consumed regardless of the
* player's current hunger.
*
* <p>Drinks may provide nutrition and saturation, but are not required to do so.
*
* <p>Categories of drinks, such as Coffee, Tea, or Alcoholic drinks should be placed in a sub-tag, such as
* {@code #c:drinks/coffee}, {@code #c:drinks/tea}, and {@code #c:drinks/alcohol}.
*
* <p>Specific types of drinks, such as Lattes, Green Tea, and Beer should go in sub-sub-tags using their regular name,
* such as {@code #c:drinks/coffee/latte}, {@code #c:drinks/tea/green_tea}, and {@code #c:drinks/alcohol/beer}.
*/
public static final TagKey<Item> DRINKS = tag("drinks");
/**
* For consumable drinks that contain only water.
*/
public static final TagKey<Item> DRINKS_WATER = tag("drinks/water");
/**
* For consumable drinks that are generally watery (such as potions).
*/
public static final TagKey<Item> DRINKS_WATERY = tag("drinks/watery");
public static final TagKey<Item> DRINKS_MILK = tag("drinks/milk");
public static final TagKey<Item> DRINKS_HONEY = tag("drinks/honey");
/**
* For consumable drinks that are magic in nature and usually grant at least one
* {@link net.minecraft.world.effect.MobEffect} when consumed.
*/
public static final TagKey<Item> DRINKS_MAGIC = tag("drinks/magic");
/**
* For drinks that always grant the {@linkplain net.minecraft.world.effect.MobEffects#BAD_OMEN Bad Omen} effect.
*/
public static final TagKey<Item> DRINKS_MAGIC_OMINOUS = tag("drinks/magic/ominous");
/**
* Plant based fruit and vegetable juices belong in this tag, for example apple juice and carrot juice.
*/
public static final TagKey<Item> DRINKS_JUICE = tag("drinks/juice");
public static final TagKey<Item> DRINKS_JUICE_APPLE = tag("drinks/juice/apple");
public static final TagKey<Item> DRINKS_JUICE_BEETROOT = tag("drinks/juice/beetroot");
public static final TagKey<Item> DRINKS_JUICE_CARROT = tag("drinks/juice/carrot");
public static final TagKey<Item> DRINKS_JUICE_MELON = tag("drinks/juice/melon");

/**
* For non-empty bottles that are {@linkplain #DRINKS drinkable}.
*/
public static final TagKey<Item> DRINK_CONTAINING_BOTTLE = tag("drink_containing/bottle");
/**
* For non-empty buckets that are {@linkplain #DRINKS drinkable}.
*/
public static final TagKey<Item> DRINK_CONTAINING_BUCKET = tag("drink_containing/bucket");

public static final TagKey<Item> DUSTS = tag("dusts");
public static final TagKey<Item> DUSTS_REDSTONE = tag("dusts/redstone");
public static final TagKey<Item> DUSTS_GLOWSTONE = tag("dusts/glowstone");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ public void addTags(HolderLookup.Provider lookupProvider) {
tag(Tags.Items.CROPS_PUMPKIN).add(Items.PUMPKIN);
tag(Tags.Items.CROPS_SUGAR_CANE).add(Items.SUGAR_CANE);
tag(Tags.Items.CROPS_WHEAT).add(Items.WHEAT);
tag(Tags.Items.DRINKS).addTags(
Tags.Items.DRINKS_WATER, Tags.Items.DRINKS_WATERY, Tags.Items.DRINKS_MILK,
Tags.Items.DRINKS_HONEY, Tags.Items.DRINKS_MAGIC, Tags.Items.DRINKS_MAGIC_OMINOUS,
Tags.Items.DRINKS_JUICE, Tags.Items.DRINKS_JUICE_APPLE, Tags.Items.DRINKS_JUICE_BEETROOT,
Tags.Items.DRINKS_JUICE_CARROT, Tags.Items.DRINKS_JUICE_MELON);
tag(Tags.Items.DRINKS_WATER);
tag(Tags.Items.DRINKS_WATERY).add(Items.POTION).addTags(Tags.Items.DRINKS_WATER);
tag(Tags.Items.DRINKS_MILK).add(Items.MILK_BUCKET);
tag(Tags.Items.DRINKS_HONEY).add(Items.HONEY_BOTTLE);
tag(Tags.Items.DRINKS_MAGIC).add(Items.POTION).addTags(Tags.Items.DRINKS_MAGIC_OMINOUS);
tag(Tags.Items.DRINKS_MAGIC_OMINOUS).add(Items.OMINOUS_BOTTLE);
tag(Tags.Items.DRINKS_JUICE).addTags(
Tags.Items.DRINKS_JUICE_APPLE, Tags.Items.DRINKS_JUICE_BEETROOT, Tags.Items.DRINKS_JUICE_CARROT,
Tags.Items.DRINKS_JUICE_MELON);
tag(Tags.Items.DRINKS_JUICE_APPLE);
tag(Tags.Items.DRINKS_JUICE_BEETROOT);
tag(Tags.Items.DRINKS_JUICE_CARROT);
tag(Tags.Items.DRINKS_JUICE_MELON);
addColored(Tags.Items.DYED, "{color}_banner");
addColored(Tags.Items.DYED, "{color}_bed");
addColored(Tags.Items.DYED, "{color}_candle");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,20 @@ protected void addTranslations() {
add(Tags.Items.CROPS_PUMPKIN, "Pumpkin Crops");
add(Tags.Items.CROPS_SUGAR_CANE, "Sugar Cane Crops");
add(Tags.Items.CROPS_WHEAT, "Wheat Crops");
add(Tags.Items.DRINKS, "Drinks");
add(Tags.Items.DRINKS_WATER, "Water");
add(Tags.Items.DRINKS_WATERY, "Watery Drinks");
add(Tags.Items.DRINKS_MILK, "Milk");
add(Tags.Items.DRINKS_HONEY, "Honey");
add(Tags.Items.DRINKS_MAGIC, "Magical Drinks");
add(Tags.Items.DRINKS_MAGIC_OMINOUS, "Ominous Drinks");
add(Tags.Items.DRINKS_JUICE, "Juice");
add(Tags.Items.DRINKS_JUICE_APPLE, "Apple Juice");
add(Tags.Items.DRINKS_JUICE_BEETROOT, "Beet Juice");
add(Tags.Items.DRINKS_JUICE_CARROT, "Carrot Juice");
add(Tags.Items.DRINKS_JUICE_MELON, "Melon Juice");
add(Tags.Items.DRINK_CONTAINING_BUCKET, "Drink Containing Buckets");
add(Tags.Items.DRINK_CONTAINING_BOTTLE, "Drink Containing Bottles");
add(Tags.Items.DUSTS, "Dusts");
add(Tags.Items.DUSTS_GLOWSTONE, "Glowstone Dusts");
add(Tags.Items.DUSTS_REDSTONE, "Redstone Dusts");
Expand Down
Loading