From 935c010b9cbbdea9aef25aedfd66b44c9f8f193b Mon Sep 17 00:00:00 2001 From: CammiePone Date: Tue, 15 Oct 2024 21:09:14 -0700 Subject: [PATCH 1/4] added animals conventional tag --- .../resources/assets/c/lang/en_us.json | 1 + .../data/c/tags/entity_type/animals.json | 42 +++++++++++++++++++ .../net/neoforged/neoforge/common/Tags.java | 1 + .../NeoForgeEntityTypeTagsProvider.java | 1 + .../internal/NeoForgeLanguageProvider.java | 1 + 5 files changed, 46 insertions(+) create mode 100644 src/generated/resources/data/c/tags/entity_type/animals.json diff --git a/src/generated/resources/assets/c/lang/en_us.json b/src/generated/resources/assets/c/lang/en_us.json index 3c27e29b49..a471e96a39 100644 --- a/src/generated/resources/assets/c/lang/en_us.json +++ b/src/generated/resources/assets/c/lang/en_us.json @@ -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", diff --git a/src/generated/resources/data/c/tags/entity_type/animals.json b/src/generated/resources/data/c/tags/entity_type/animals.json new file mode 100644 index 0000000000..0815d2af7c --- /dev/null +++ b/src/generated/resources/data/c/tags/entity_type/animals.json @@ -0,0 +1,42 @@ +{ + "values": [ + "minecraft:armadillo", + "minecraft:axolotl", + "minecraft:bee", + "minecraft:camel", + "minecraft:cat", + "minecraft:chicken", + "minecraft:cod", + "minecraft:cod", + "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" + ] +} \ No newline at end of file diff --git a/src/main/java/net/neoforged/neoforge/common/Tags.java b/src/main/java/net/neoforged/neoforge/common/Tags.java index 8a57785dc8..7cd37a6b1a 100644 --- a/src/main/java/net/neoforged/neoforge/common/Tags.java +++ b/src/main/java/net/neoforged/neoforge/common/Tags.java @@ -246,6 +246,7 @@ public static class EntityTypes { public static final TagKey> BOSSES = tag("bosses"); public static final TagKey> MINECARTS = tag("minecarts"); public static final TagKey> BOATS = tag("boats"); + public static final TagKey> 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 diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java index 16a951bedd..120d528e3e 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java @@ -24,6 +24,7 @@ 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.COD, 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); 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 f764016f5c..05c6bf7a70 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 @@ -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"); From bf2fb8d6aac7953aedf8997c8600b8216858c3ba Mon Sep 17 00:00:00 2001 From: CammiePone Date: Wed, 16 Oct 2024 00:30:59 -0700 Subject: [PATCH 2/4] changed 2nd cod to cow like it was supposed to be --- .../common/data/internal/NeoForgeEntityTypeTagsProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java index 120d528e3e..f802599fac 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java @@ -24,7 +24,7 @@ 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.COD, 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.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); From 9c69ce66686a0beb59d87fd4231ee92d15bdd0df Mon Sep 17 00:00:00 2001 From: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> Date: Sat, 9 Nov 2024 12:06:30 -0500 Subject: [PATCH 3/4] SPOTLESS --- .../NeoForgeEntityTypeTagsProvider.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java index 7727038324..9a7544d31f 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeEntityTypeTagsProvider.java @@ -39,39 +39,39 @@ public void addTags(HolderLookup.Provider lookupProvider) { .add( EntityType.ARMADILLO, EntityType.AXOLOTL, - EntityType.BEE, - EntityType.CAMEL, + EntityType.BEE, + EntityType.CAMEL, EntityType.CAT, EntityType.CHICKEN, - EntityType.COD, + EntityType.COD, EntityType.COW, EntityType.DOLPHIN, EntityType.DONKEY, EntityType.FOX, - EntityType.FROG, - EntityType.GLOW_SQUID, - EntityType.GOAT, + EntityType.FROG, + EntityType.GLOW_SQUID, + EntityType.GOAT, EntityType.HOGLIN, EntityType.HORSE, EntityType.LLAMA, EntityType.MOOSHROOM, - EntityType.MULE, + EntityType.MULE, EntityType.OCELOT, EntityType.PANDA, - EntityType.PARROT, - EntityType.PIG, - EntityType.POLAR_BEAR, + EntityType.PARROT, + EntityType.PIG, + EntityType.POLAR_BEAR, EntityType.PUFFERFISH, - EntityType.RABBIT, + EntityType.RABBIT, EntityType.SALMON, EntityType.SHEEP, - EntityType.SKELETON_HORSE, + EntityType.SKELETON_HORSE, EntityType.SNIFFER, EntityType.SQUID, EntityType.STRIDER, EntityType.TADPOLE, EntityType.TRADER_LLAMA, - EntityType.TROPICAL_FISH, + EntityType.TROPICAL_FISH, EntityType.TURTLE, EntityType.WOLF, EntityType.ZOMBIE_HORSE); From 5a220c81782944bb229e87fc5302d03e60395f4a Mon Sep 17 00:00:00 2001 From: Cammie Date: Tue, 19 Nov 2024 12:53:21 -0800 Subject: [PATCH 4/4] Update Tags.java --- src/main/java/net/neoforged/neoforge/common/Tags.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/neoforged/neoforge/common/Tags.java b/src/main/java/net/neoforged/neoforge/common/Tags.java index 7cd37a6b1a..67a979effc 100644 --- a/src/main/java/net/neoforged/neoforge/common/Tags.java +++ b/src/main/java/net/neoforged/neoforge/common/Tags.java @@ -246,6 +246,10 @@ public static class EntityTypes { public static final TagKey> BOSSES = tag("bosses"); public static final TagKey> MINECARTS = tag("minecarts"); public static final TagKey> BOATS = tag("boats"); + + /** + * Tag containing entity types that extend Animal. + */ public static final TagKey> ANIMALS = tag("animals"); /**