From 85e7ec0af2ed4bb9678d54b79b6a33c4c3935cf7 Mon Sep 17 00:00:00 2001 From: "Joseph T. McQuigg" Date: Sun, 29 Sep 2024 06:34:54 -0400 Subject: [PATCH] Add Pie Item Tag c:foods/pie (#1560) Co-authored-by: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> --- src/generated/resources/assets/c/lang/en_us.json | 1 + src/generated/resources/data/c/tags/item/foods.json | 1 + src/generated/resources/data/c/tags/item/foods/pie.json | 5 +++++ .../neoforged/neoforge/common/TagConventionLogWarning.java | 3 +++ src/main/java/net/neoforged/neoforge/common/Tags.java | 4 ++++ .../common/data/internal/NeoForgeItemTagsProvider.java | 3 ++- .../common/data/internal/NeoForgeLanguageProvider.java | 1 + 7 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/generated/resources/data/c/tags/item/foods/pie.json diff --git a/src/generated/resources/assets/c/lang/en_us.json b/src/generated/resources/assets/c/lang/en_us.json index 73ff339a03..626b385a89 100644 --- a/src/generated/resources/assets/c/lang/en_us.json +++ b/src/generated/resources/assets/c/lang/en_us.json @@ -239,6 +239,7 @@ "tag.item.c.foods.food_poisoning": "Food Poisoning Foods", "tag.item.c.foods.fruit": "Fruits", "tag.item.c.foods.golden": "Golden Foods", + "tag.item.c.foods.pie": "Pies", "tag.item.c.foods.raw_fish": "Raw Fishes", "tag.item.c.foods.raw_meat": "Raw Meats", "tag.item.c.foods.soup": "Soups", diff --git a/src/generated/resources/data/c/tags/item/foods.json b/src/generated/resources/data/c/tags/item/foods.json index 78e6a1945b..401cd7e0e9 100644 --- a/src/generated/resources/data/c/tags/item/foods.json +++ b/src/generated/resources/data/c/tags/item/foods.json @@ -16,6 +16,7 @@ "#c:foods/cooked_fish", "#c:foods/soup", "#c:foods/candy", + "#c:foods/pie", "#c:foods/golden", "#c:foods/edible_when_placed", "#c:foods/food_poisoning" diff --git a/src/generated/resources/data/c/tags/item/foods/pie.json b/src/generated/resources/data/c/tags/item/foods/pie.json new file mode 100644 index 0000000000..7589c5f241 --- /dev/null +++ b/src/generated/resources/data/c/tags/item/foods/pie.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:pumpkin_pie" + ] +} \ No newline at end of file diff --git a/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java b/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java index f874d45787..8802212cbf 100644 --- a/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java +++ b/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java @@ -411,6 +411,9 @@ public enum LogWarningMode { createForgeMapEntry(Registries.ITEM, "candy", Tags.Items.FOODS_CANDY), createForgeMapEntry(Registries.ITEM, "candies", Tags.Items.FOODS_CANDY), createMapEntry(Registries.ITEM, "c", "foods/candies", Tags.Items.FOODS_CANDY), + createForgeMapEntry(Registries.ITEM, "pie", Tags.Items.FOODS_PIE), + createForgeMapEntry(Registries.ITEM, "pies", Tags.Items.FOODS_PIE), + createMapEntry(Registries.ITEM, "c", "foods/pies", Tags.Items.FOODS_PIE), createForgeMapEntry(Registries.FLUID, "water", Tags.Fluids.WATER), createForgeMapEntry(Registries.FLUID, "lava", Tags.Fluids.LAVA), diff --git a/src/main/java/net/neoforged/neoforge/common/Tags.java b/src/main/java/net/neoforged/neoforge/common/Tags.java index 56620f22d4..c4dfe263b7 100644 --- a/src/main/java/net/neoforged/neoforge/common/Tags.java +++ b/src/main/java/net/neoforged/neoforge/common/Tags.java @@ -429,6 +429,10 @@ public static class Items { * Sweets and candies like lollipops or chocolate belong in this tag. */ public static final TagKey FOODS_CANDY = tag("foods/candy"); + /** + * Pies and other pie-like foods belong in this tag. + */ + public static final TagKey FOODS_PIE = tag("foods/pie"); /** * Any gold-based foods would go in this tag. Such as Golden Apples or Glistering Melon Slice. */ diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java index 13013eb54d..f683fa8a72 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java @@ -121,6 +121,7 @@ public void addTags(HolderLookup.Provider lookupProvider) { tag(Tags.Items.FOODS_COOKED_FISH).add(Items.COOKED_COD, Items.COOKED_SALMON); tag(Tags.Items.FOODS_SOUP).add(Items.BEETROOT_SOUP, Items.MUSHROOM_STEW, Items.RABBIT_STEW, Items.SUSPICIOUS_STEW); tag(Tags.Items.FOODS_CANDY); + tag(Tags.Items.FOODS_PIE).add(Items.PUMPKIN_PIE); tag(Tags.Items.FOODS_GOLDEN).add(Items.GOLDEN_APPLE).add(Items.ENCHANTED_GOLDEN_APPLE).add(Items.GOLDEN_CARROT); tag(Tags.Items.FOODS_EDIBLE_WHEN_PLACED).add(Items.CAKE); tag(Tags.Items.FOODS_FOOD_POISONING).add(Items.POISONOUS_POTATO, Items.PUFFERFISH, Items.SPIDER_EYE, Items.CHICKEN, Items.ROTTEN_FLESH); @@ -128,7 +129,7 @@ public void addTags(HolderLookup.Provider lookupProvider) { .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_GOLDEN, + 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, diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java index ebac817994..f8cb9f9f26 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java @@ -206,6 +206,7 @@ protected void addTranslations() { add(Tags.Items.FOODS_BERRY, "Berries"); add(Tags.Items.FOODS_BREAD, "Breads"); add(Tags.Items.FOODS_CANDY, "Candies"); + add(Tags.Items.FOODS_PIE, "Pies"); add(Tags.Items.FOODS_COOKED_FISH, "Cooked Fishes"); add(Tags.Items.FOODS_COOKED_MEAT, "Cooked Meats"); add(Tags.Items.FOODS_COOKIE, "Cookies");