Skip to content

Commit

Permalink
Added c:animal_foods tag for all foods that can be eaten by animals (
Browse files Browse the repository at this point in the history
  • Loading branch information
Edivad99 authored Sep 10, 2024
1 parent a1640e1 commit 8fc8eef
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
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 @@ -136,6 +136,7 @@
"tag.fluid.c.rabbit_stew": "Rabbit Stew",
"tag.fluid.c.suspicious_stew": "Suspicious Stew",
"tag.fluid.c.water": "Water",
"tag.item.c.animal_foods": "Animal Foods",
"tag.item.c.armors": "Armors",
"tag.item.c.barrels": "Barrels",
"tag.item.c.barrels.wooden": "Wooden Barrels",
Expand Down
28 changes: 28 additions & 0 deletions src/generated/resources/data/c/tags/item/animal_foods.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"values": [
"#minecraft:armadillo_food",
"#minecraft:axolotl_food",
"#minecraft:bee_food",
"#minecraft:camel_food",
"#minecraft:cat_food",
"#minecraft:chicken_food",
"#minecraft:cow_food",
"#minecraft:fox_food",
"#minecraft:frog_food",
"#minecraft:goat_food",
"#minecraft:hoglin_food",
"#minecraft:horse_food",
"#minecraft:llama_food",
"#minecraft:ocelot_food",
"#minecraft:panda_food",
"#minecraft:parrot_food",
"#minecraft:pig_food",
"#minecraft:piglin_food",
"#minecraft:rabbit_food",
"#minecraft:sheep_food",
"#minecraft:sniffer_food",
"#minecraft:strider_food",
"#minecraft:turtle_food",
"#minecraft:wolf_food"
]
}
5 changes: 5 additions & 0 deletions src/main/java/net/neoforged/neoforge/common/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,11 @@ public static class Items {
* Examples are Rotten Flesh's Hunger or Pufferfish's Nausea, or Poisonous Potato's Poison.
*/
public static final TagKey<Item> FOODS_FOOD_POISONING = tag("foods/food_poisoning");
/**
* All foods edible by animals excluding poisonous foods.
* (Does not include {@link ItemTags#PARROT_POISONOUS_FOOD})
*/
public static final TagKey<Item> ANIMAL_FOODS = tag("animal_foods");
public static final TagKey<Item> GEMS = tag("gems");
public static final TagKey<Item> GEMS_DIAMOND = tag("gems/diamond");
public static final TagKey<Item> GEMS_EMERALD = tag("gems/emerald");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ public void addTags(HolderLookup.Provider lookupProvider) {
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_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,
ItemTags.GOAT_FOOD, ItemTags.HOGLIN_FOOD, ItemTags.HORSE_FOOD, ItemTags.LLAMA_FOOD, ItemTags.OCELOT_FOOD,
ItemTags.PANDA_FOOD, ItemTags.PARROT_FOOD, ItemTags.PIG_FOOD, ItemTags.PIGLIN_FOOD, ItemTags.RABBIT_FOOD,
ItemTags.SHEEP_FOOD, ItemTags.SNIFFER_FOOD, ItemTags.STRIDER_FOOD, ItemTags.TURTLE_FOOD, ItemTags.WOLF_FOOD);
tag(Tags.Items.GEMS).addTags(Tags.Items.GEMS_AMETHYST, Tags.Items.GEMS_DIAMOND, Tags.Items.GEMS_EMERALD, Tags.Items.GEMS_LAPIS, Tags.Items.GEMS_PRISMARINE, Tags.Items.GEMS_QUARTZ);
tag(Tags.Items.GEMS_AMETHYST).add(Items.AMETHYST_SHARD);
tag(Tags.Items.GEMS_DIAMOND).add(Items.DIAMOND);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ protected void addTranslations() {
add(Tags.Items.FOODS_RAW_MEAT, "Raw Meats");
add(Tags.Items.FOODS_SOUP, "Soups");
add(Tags.Items.FOODS_VEGETABLE, "Vegetables");
add(Tags.Items.ANIMAL_FOODS, "Animal Foods");
add(Tags.Items.GEMS, "Gems");
add(Tags.Items.GEMS_AMETHYST, "Amethyst Gems");
add(Tags.Items.GEMS_DIAMOND, "Diamond Gems");
Expand Down

0 comments on commit 8fc8eef

Please sign in to comment.