mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-11 22:45:38 -04:00
Convention Drink Tags (#4384)
* add drink tag keys * add tags to datagen * generate tags * add translations * drink container tags * update wording of javadoc * fix grammar in javadoc * fix more javadoc typos * add juice drink type tags * number the rules for a drink * watery tag; clarify rule 4 of drink definition * remove rule 4 of the drinks tag * fix java doc typo * generate watery tag * match juice tag names to vanilla ids * remove subsub juice tags * fix potential inconsistency in the drinks javadoc for alcoholic drinks * remove sub sub tags
This commit is contained in:
parent
2c3f4f5905
commit
c81f59020f
14 changed files with 190 additions and 0 deletions
fabric-convention-tags-v2/src
datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators
generated/resources
assets/fabric-convention-tags-v2/lang
data/c/tags/item
main/java/net/fabricmc/fabric/api/tag/convention/v2
|
@ -279,6 +279,16 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider {
|
|||
translationBuilder.add(ConventionalItemTags.COOKED_FISHES_FOODS, "Cooked Fishes");
|
||||
translationBuilder.add(ConventionalItemTags.SOUPS_FOODS, "Soups");
|
||||
translationBuilder.add(ConventionalItemTags.CANDIES_FOODS, "Candies");
|
||||
translationBuilder.add(ConventionalItemTags.DRINKS, "Drinks");
|
||||
translationBuilder.add(ConventionalItemTags.WATER_DRINKS, "Water");
|
||||
translationBuilder.add(ConventionalItemTags.WATERY_DRINKS, "Watery Drinks");
|
||||
translationBuilder.add(ConventionalItemTags.MILK_DRINKS, "Milk");
|
||||
translationBuilder.add(ConventionalItemTags.HONEY_DRINKS, "Honey");
|
||||
translationBuilder.add(ConventionalItemTags.MAGIC_DRINKS, "Magical Drinks");
|
||||
translationBuilder.add(ConventionalItemTags.OMINOUS_DRINKS, "Ominous Drinks");
|
||||
translationBuilder.add(ConventionalItemTags.JUICE_DRINKS, "Juice");
|
||||
translationBuilder.add(ConventionalItemTags.DRINK_CONTAINING_BUCKET, "Drink Containing Buckets");
|
||||
translationBuilder.add(ConventionalItemTags.DRINK_CONTAINING_BOTTLE, "Drink Containing Bottles");
|
||||
translationBuilder.add(ConventionalItemTags.BUCKETS, "Buckets");
|
||||
translationBuilder.add(ConventionalItemTags.WATER_BUCKETS, "Water Buckets");
|
||||
translationBuilder.add(ConventionalItemTags.ENTITY_WATER_BUCKETS, "Entity Water Buckets");
|
||||
|
|
|
@ -376,6 +376,44 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider {
|
|||
.addOptionalTag(ConventionalItemTags.EDIBLE_WHEN_PLACED_FOODS)
|
||||
.addOptionalTag(ConventionalItemTags.FOOD_POISONING_FOODS);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.DRINKS)
|
||||
.addOptionalTag(ConventionalItemTags.WATER_DRINKS)
|
||||
.addOptionalTag(ConventionalItemTags.WATERY_DRINKS)
|
||||
.addOptionalTag(ConventionalItemTags.MILK_DRINKS)
|
||||
.addOptionalTag(ConventionalItemTags.HONEY_DRINKS)
|
||||
.addOptionalTag(ConventionalItemTags.MAGIC_DRINKS)
|
||||
.addOptionalTag(ConventionalItemTags.OMINOUS_DRINKS)
|
||||
.addOptionalTag(ConventionalItemTags.JUICE_DRINKS);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.WATER_DRINKS);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.WATERY_DRINKS)
|
||||
.add(Items.POTION)
|
||||
.addOptionalTag(ConventionalItemTags.WATER_DRINKS);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.MILK_DRINKS)
|
||||
.add(Items.MILK_BUCKET);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.HONEY_DRINKS)
|
||||
.add(Items.HONEY_BOTTLE);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.MAGIC_DRINKS)
|
||||
.add(Items.POTION)
|
||||
.addOptionalTag(ConventionalItemTags.OMINOUS_DRINKS);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.OMINOUS_DRINKS)
|
||||
.add(Items.OMINOUS_BOTTLE);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.JUICE_DRINKS);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.DRINK_CONTAINING_BUCKET)
|
||||
.add(Items.MILK_BUCKET);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalItemTags.DRINK_CONTAINING_BOTTLE)
|
||||
.add(Items.POTION)
|
||||
.add(Items.HONEY_BOTTLE)
|
||||
.add(Items.OMINOUS_BOTTLE);
|
||||
|
||||
// Deprecated tags below
|
||||
getOrCreateTagBuilder(ConventionalItemTags.FRUITS_FOODS)
|
||||
.add(Items.APPLE)
|
||||
|
|
|
@ -188,6 +188,16 @@
|
|||
"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.magic": "Magical Drinks",
|
||||
"tag.item.c.drinks.milk": "Milk",
|
||||
"tag.item.c.drinks.ominous": "Ominous Drinks",
|
||||
"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",
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:potion",
|
||||
"minecraft:honey_bottle",
|
||||
"minecraft:ominous_bottle"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:milk_bucket"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"values": [
|
||||
{
|
||||
"id": "#c:drinks/water",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"id": "#c:drinks/watery",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"id": "#c:drinks/milk",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"id": "#c:drinks/honey",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"id": "#c:drinks/magic",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"id": "#c:drinks/ominous",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"id": "#c:drinks/juice",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:honey_bottle"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"values": []
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:potion",
|
||||
{
|
||||
"id": "#c:drinks/ominous",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:milk_bucket"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:ominous_bottle"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"values": []
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:potion",
|
||||
{
|
||||
"id": "#c:drinks/water",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -247,6 +247,55 @@ public final class ConventionalItemTags {
|
|||
*/
|
||||
public static final TagKey<Item> FOOD_POISONING_FOODS = register("foods/food_poisoning");
|
||||
|
||||
// Drinks
|
||||
/**
|
||||
* Drinks are defined as (1) consumable items that (2) use the
|
||||
* {@linkplain net.minecraft.item.consume.UseAction#DRINK drink use action}, (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>More specific types of drinks, such as Water, Milk, or Juice should be placed in a sub-tag, such as
|
||||
* {@code #c:drinks/water}, {@code #c:drinks/milk}, and {@code #c:drinks/juice}.
|
||||
*/
|
||||
public static final TagKey<Item> DRINKS = register("drinks");
|
||||
/**
|
||||
* For consumable drinks that contain only water.
|
||||
*/
|
||||
public static final TagKey<Item> WATER_DRINKS = register("drinks/water");
|
||||
/**
|
||||
* For consumable drinks that are generally watery (such as potions).
|
||||
*/
|
||||
public static final TagKey<Item> WATERY_DRINKS = register("drinks/watery");
|
||||
public static final TagKey<Item> MILK_DRINKS = register("drinks/milk");
|
||||
public static final TagKey<Item> HONEY_DRINKS = register("drinks/honey");
|
||||
/**
|
||||
* For consumable drinks that are magic in nature and usually grant at least one
|
||||
* {@link net.minecraft.entity.effect.StatusEffect} when consumed.
|
||||
*/
|
||||
public static final TagKey<Item> MAGIC_DRINKS = register("drinks/magic");
|
||||
/**
|
||||
* For drinks that always grant the {@linkplain net.minecraft.entity.effect.StatusEffects#BAD_OMEN Bad Omen} effect.
|
||||
*/
|
||||
public static final TagKey<Item> OMINOUS_DRINKS = register("drinks/ominous");
|
||||
/**
|
||||
* Non-alcoholic, plant based fruit and vegetable juices belong in this tag, for example apple juice and carrot juice.
|
||||
*
|
||||
* <p>If tags for specific types of juices are desired, they may go in a sub-tag, using their regular name such as
|
||||
* {@code #c:drinks/apple_juice}.
|
||||
*/
|
||||
public static final TagKey<Item> JUICE_DRINKS = register("drinks/juice");
|
||||
|
||||
// Drink containing items
|
||||
/**
|
||||
* For non-empty buckets that are {@linkplain #DRINKS drinkable}.
|
||||
*/
|
||||
public static final TagKey<Item> DRINK_CONTAINING_BUCKET = register("drink_containing/bucket");
|
||||
/**
|
||||
* For non-empty bottles that are {@linkplain #DRINKS drinkable}.
|
||||
*/
|
||||
public static final TagKey<Item> DRINK_CONTAINING_BOTTLE = register("drink_containing/bottle");
|
||||
|
||||
// Buckets
|
||||
public static final TagKey<Item> BUCKETS = register("buckets");
|
||||
public static final TagKey<Item> EMPTY_BUCKETS = register("buckets/empty");
|
||||
|
|
Loading…
Add table
Reference in a new issue