Skip to content
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
1 change: 1 addition & 0 deletions src/generated/resources/assets/c/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"tag.item.c.foods.cooked_fish": "Cooked Fishes",
"tag.item.c.foods.cooked_meat": "Cooked Meats",
"tag.item.c.foods.cookie": "Cookies",
"tag.item.c.foods.dough": "Doughs",
"tag.item.c.foods.edible_when_placed": "Edible When Placed",
"tag.item.c.foods.food_poisoning": "Food Poisoning Foods",
"tag.item.c.foods.fruit": "Fruits",
Expand Down
1 change: 1 addition & 0 deletions src/generated/resources/data/c/tags/item/foods.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"#c:foods/berry",
"#c:foods/bread",
"#c:foods/cookie",
"#c:foods/dough",
"#c:foods/raw_meat",
"#c:foods/raw_fish",
"#c:foods/cooked_meat",
Expand Down
8 changes: 8 additions & 0 deletions src/generated/resources/data/c/tags/item/foods/dough.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"values": [
{
"id": "#c:foods/doughs",
"required": false
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ public enum LogWarningMode {
createForgeMapEntry(Registries.ITEM, "cookie", Tags.Items.FOODS_COOKIE),
createForgeMapEntry(Registries.ITEM, "cookies", Tags.Items.FOODS_COOKIE),
createMapEntry(Registries.ITEM, "c", "foods/cookies", Tags.Items.FOODS_COOKIE),
createForgeMapEntry(Registries.ITEM, "dough", Tags.Items.FOODS_DOUGH),
createForgeMapEntry(Registries.ITEM, "doughs", Tags.Items.FOODS_DOUGH),
createMapEntry(Registries.ITEM, "c", "foods/doughs", Tags.Items.FOODS_DOUGH),
createForgeMapEntry(Registries.ITEM, "raw_meat", Tags.Items.FOODS_RAW_MEAT),
createForgeMapEntry(Registries.ITEM, "raw_meats", Tags.Items.FOODS_RAW_MEAT),
createMapEntry(Registries.ITEM, "c", "foods/raw_meats", Tags.Items.FOODS_RAW_MEAT),
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/net/neoforged/neoforge/common/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,20 @@ public static class Items {
public static final TagKey<Item> FOODS_BERRY = tag("foods/berry");
public static final TagKey<Item> FOODS_BREAD = tag("foods/bread");
public static final TagKey<Item> FOODS_COOKIE = tag("foods/cookie");
/**
* For all doughs regardless of type, specific types of dough should fall under their respective sub-tag.<br/>
* For example:<br/>
* - Wheat dough (which generally results in bread) would go in "#c:foods/dough/wheat"<br/>
* - Rye dough (which has rye as it's main ingredient) would go in "#c:foods/dough/rye"<br/>
* - Sub-tags should also be added to this tag, for example: "#c:foods/dough/wheat" should be added to "#c:foods/dough"<br/>
* <br/>
* There are some important assumptions that should be kept in mind.<br/>
* - It is assumed that "1 dough = result", which in the case of wheat dough would be "1 dough = 1 bread"<br/>
* - It is assumed that this dough can be baked into another item<br/>
* - It is *not* assumed that all doughs result in bread, there can be doughs in this tag that result in things like pizza, etc.
* This means that this tag should *not* be used for furnace recipes, mods should add their own dough to result recipes for their respective items.
*/
public static final TagKey<Item> FOODS_DOUGH = tag("foods/dough");
public static final TagKey<Item> FOODS_RAW_MEAT = tag("foods/raw_meat");
public static final TagKey<Item> FOODS_COOKED_MEAT = tag("foods/cooked_meat");
public static final TagKey<Item> FOODS_RAW_FISH = tag("foods/raw_fish");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public void addTags(HolderLookup.Provider lookupProvider) {
tag(Tags.Items.FOODS_BERRY).add(Items.SWEET_BERRIES, Items.GLOW_BERRIES);
tag(Tags.Items.FOODS_BREAD).add(Items.BREAD);
tag(Tags.Items.FOODS_COOKIE).add(Items.COOKIE);
tag(Tags.Items.FOODS_DOUGH);
tag(Tags.Items.FOODS_RAW_MEAT).add(Items.BEEF, Items.PORKCHOP, Items.CHICKEN, Items.RABBIT, Items.MUTTON);
tag(Tags.Items.FOODS_RAW_FISH).add(Items.COD, Items.SALMON, Items.TROPICAL_FISH, Items.PUFFERFISH);
tag(Tags.Items.FOODS_COOKED_MEAT).add(Items.COOKED_BEEF, Items.COOKED_PORKCHOP, Items.COOKED_CHICKEN, Items.COOKED_RABBIT, Items.COOKED_MUTTON);
Expand All @@ -138,10 +139,10 @@ public void addTags(HolderLookup.Provider lookupProvider) {
tag(Tags.Items.FOODS_FOOD_POISONING).add(Items.POISONOUS_POTATO, Items.PUFFERFISH, Items.SPIDER_EYE, Items.CHICKEN, Items.ROTTEN_FLESH);
tag(Tags.Items.FOODS)
.add(Items.BAKED_POTATO, Items.PUMPKIN_PIE, Items.HONEY_BOTTLE, Items.OMINOUS_BOTTLE, Items.DRIED_KELP)
.addTags(Tags.Items.FOODS_FRUIT, Tags.Items.FOODS_VEGETABLE, Tags.Items.FOODS_BERRY, Tags.Items.FOODS_BREAD, Tags.Items.FOODS_COOKIE,
Tags.Items.FOODS_RAW_MEAT, Tags.Items.FOODS_RAW_FISH, Tags.Items.FOODS_COOKED_MEAT, Tags.Items.FOODS_COOKED_FISH,
Tags.Items.FOODS_SOUP, Tags.Items.FOODS_CANDY, Tags.Items.FOODS_PIE, Tags.Items.FOODS_GOLDEN,
Tags.Items.FOODS_EDIBLE_WHEN_PLACED, Tags.Items.FOODS_FOOD_POISONING);
.addTags(Tags.Items.FOODS_FRUIT, Tags.Items.FOODS_VEGETABLE, Tags.Items.FOODS_BERRY, Tags.Items.FOODS_BREAD,
Tags.Items.FOODS_COOKIE, Tags.Items.FOODS_DOUGH, Tags.Items.FOODS_RAW_MEAT, Tags.Items.FOODS_RAW_FISH,
Tags.Items.FOODS_COOKED_MEAT, Tags.Items.FOODS_COOKED_FISH, Tags.Items.FOODS_SOUP, Tags.Items.FOODS_CANDY,
Tags.Items.FOODS_PIE, Tags.Items.FOODS_GOLDEN, Tags.Items.FOODS_EDIBLE_WHEN_PLACED, Tags.Items.FOODS_FOOD_POISONING);
tag(Tags.Items.ANIMAL_FOODS)
.addTags(ItemTags.ARMADILLO_FOOD, ItemTags.AXOLOTL_FOOD, ItemTags.BEE_FOOD, ItemTags.CAMEL_FOOD,
ItemTags.CAT_FOOD, ItemTags.CHICKEN_FOOD, ItemTags.COW_FOOD, ItemTags.FOX_FOOD, ItemTags.FROG_FOOD,
Expand Down Expand Up @@ -369,6 +370,7 @@ public void addTags(HolderLookup.Provider lookupProvider) {
.addOptionalTag(ResourceLocation.fromNamespaceAndPath("forge", "stained_glass/yellow"));
tagWithOptionalLegacy(Tags.Items.ENDER_PEARLS);
tagWithOptionalLegacy(Tags.Items.FEATHERS);
tag(Tags.Items.FOODS_DOUGH).addOptionalTag(ResourceLocation.fromNamespaceAndPath("c", "foods/doughs"));
tagWithOptionalLegacy(Tags.Items.GEMS);
tagWithOptionalLegacy(Tags.Items.GEMS_AMETHYST);
tagWithOptionalLegacy(Tags.Items.GEMS_DIAMOND);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ protected void addTranslations() {
add(Tags.Items.FOODS_COOKED_FISH, "Cooked Fishes");
add(Tags.Items.FOODS_COOKED_MEAT, "Cooked Meats");
add(Tags.Items.FOODS_COOKIE, "Cookies");
add(Tags.Items.FOODS_DOUGH, "Doughs");
add(Tags.Items.FOODS_EDIBLE_WHEN_PLACED, "Edible When Placed");
add(Tags.Items.FOODS_FOOD_POISONING, "Food Poisoning Foods");
add(Tags.Items.FOODS_FRUIT, "Fruits");
Expand Down
Loading