Skip to content

Commit

Permalink
[1.21.1] Add conventional tag for all animals
Browse files Browse the repository at this point in the history
Backport of
neoforged#1596
  • Loading branch information
TelepathicGrunt committed Nov 9, 2024
1 parent ef8bc0e commit 692ec51
Show file tree
Hide file tree
Showing 5 changed files with 85 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 @@ -124,6 +124,7 @@
"tag.enchantment.c.increase_block_drops": "Increase Block Drops",
"tag.enchantment.c.increase_entity_drops": "Increase Entity Drops",
"tag.enchantment.c.weapon_damage_enhancements": "Weapon Damage Enhancements",
"tag.entity_type.c.animals": "Animals",
"tag.entity_type.c.boats": "Boats",
"tag.entity_type.c.bosses": "Bosses",
"tag.entity_type.c.capturing_not_supported": "Capturing Not Supported",
Expand Down
42 changes: 42 additions & 0 deletions src/generated/resources/data/c/tags/entity_type/animals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"values": [
"minecraft:armadillo",
"minecraft:axolotl",
"minecraft:bee",
"minecraft:camel",
"minecraft:cat",
"minecraft:chicken",
"minecraft:cod",
"minecraft:cow",
"minecraft:dolphin",
"minecraft:donkey",
"minecraft:fox",
"minecraft:frog",
"minecraft:glow_squid",
"minecraft:goat",
"minecraft:hoglin",
"minecraft:horse",
"minecraft:llama",
"minecraft:mooshroom",
"minecraft:mule",
"minecraft:ocelot",
"minecraft:panda",
"minecraft:parrot",
"minecraft:pig",
"minecraft:polar_bear",
"minecraft:pufferfish",
"minecraft:rabbit",
"minecraft:salmon",
"minecraft:sheep",
"minecraft:skeleton_horse",
"minecraft:sniffer",
"minecraft:squid",
"minecraft:strider",
"minecraft:tadpole",
"minecraft:trader_llama",
"minecraft:tropical_fish",
"minecraft:turtle",
"minecraft:wolf",
"minecraft:zombie_horse"
]
}
1 change: 1 addition & 0 deletions src/main/java/net/neoforged/neoforge/common/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ public static class EntityTypes {
public static final TagKey<EntityType<?>> BOSSES = tag("bosses");
public static final TagKey<EntityType<?>> MINECARTS = tag("minecarts");
public static final TagKey<EntityType<?>> BOATS = tag("boats");
public static final TagKey<EntityType<?>> ANIMALS = tag("animals");

/**
* Entities should be included in this tag if they are not allowed to be picked up by items or grabbed in a way
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,46 @@ public void addTags(HolderLookup.Provider lookupProvider) {
tag(Tags.EntityTypes.BOSSES).add(EntityType.ENDER_DRAGON, EntityType.WITHER);
tag(Tags.EntityTypes.MINECARTS).add(EntityType.MINECART, EntityType.CHEST_MINECART, EntityType.FURNACE_MINECART, EntityType.HOPPER_MINECART, EntityType.SPAWNER_MINECART, EntityType.TNT_MINECART, EntityType.COMMAND_BLOCK_MINECART);
tag(Tags.EntityTypes.BOATS).add(EntityType.BOAT, EntityType.CHEST_BOAT);
tag(Tags.EntityTypes.ANIMALS)
.add(
EntityType.ARMADILLO,
EntityType.AXOLOTL,
EntityType.BEE,
EntityType.CAMEL,
EntityType.CAT,
EntityType.CHICKEN,
EntityType.COD,
EntityType.COW,
EntityType.DOLPHIN,
EntityType.DONKEY,
EntityType.FOX,
EntityType.FROG,
EntityType.GLOW_SQUID,
EntityType.GOAT,
EntityType.HOGLIN,
EntityType.HORSE,
EntityType.LLAMA,
EntityType.MOOSHROOM,
EntityType.MULE,
EntityType.OCELOT,
EntityType.PANDA,
EntityType.PARROT,
EntityType.PIG,
EntityType.POLAR_BEAR,
EntityType.PUFFERFISH,
EntityType.RABBIT,
EntityType.SALMON,
EntityType.SHEEP,
EntityType.SKELETON_HORSE,
EntityType.SNIFFER,
EntityType.SQUID,
EntityType.STRIDER,
EntityType.TADPOLE,
EntityType.TRADER_LLAMA,
EntityType.TROPICAL_FISH,
EntityType.TURTLE,
EntityType.WOLF,
EntityType.ZOMBIE_HORSE);
tag(Tags.EntityTypes.CAPTURING_NOT_SUPPORTED);
tag(Tags.EntityTypes.TELEPORTING_NOT_SUPPORTED);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ protected void addTranslations() {
add(Tags.EntityTypes.BOSSES, "Bosses");
add(Tags.EntityTypes.MINECARTS, "Minecarts");
add(Tags.EntityTypes.BOATS, "Boats");
add(Tags.EntityTypes.ANIMALS, "Animals");
add(Tags.EntityTypes.CAPTURING_NOT_SUPPORTED, "Capturing Not Supported");
add(Tags.EntityTypes.TELEPORTING_NOT_SUPPORTED, "Teleporting Not Supported");

Expand Down

0 comments on commit 692ec51

Please sign in to comment.