From 605586f7f9b0c005ae80680d122f85438eded010 Mon Sep 17 00:00:00 2001 From: CammiePone Date: Tue, 15 Oct 2024 20:34:26 -0700 Subject: [PATCH 1/3] add animal tag to ConventionalEntityTypeTags --- .../generators/EnglishTagLangGenerator.java | 1 + .../generators/EntityTypeTagGenerator.java | 39 +++++++++++++++++++ .../v2/ConventionalEntityTypeTags.java | 1 + 3 files changed, 41 insertions(+) diff --git a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnglishTagLangGenerator.java b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnglishTagLangGenerator.java index bbcdabc38b..ac59f52e4a 100644 --- a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnglishTagLangGenerator.java +++ b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnglishTagLangGenerator.java @@ -342,6 +342,7 @@ public void generateTranslations(RegistryWrapper.WrapperLookup registryLookup, T translationBuilder.add(ConventionalEntityTypeTags.BOSSES, "Bosses"); translationBuilder.add(ConventionalEntityTypeTags.MINECARTS, "Minecarts"); translationBuilder.add(ConventionalEntityTypeTags.BOATS, "Boats"); + translationBuilder.add(ConventionalEntityTypeTags.ANIMALS, "Animals"); translationBuilder.add(ConventionalEntityTypeTags.CAPTURING_NOT_SUPPORTED, "Capturing Not Supported"); translationBuilder.add(ConventionalEntityTypeTags.TELEPORTING_NOT_SUPPORTED, "Teleporting Not Supported"); diff --git a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EntityTypeTagGenerator.java b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EntityTypeTagGenerator.java index d14805a28b..a9f27ba3f3 100644 --- a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EntityTypeTagGenerator.java +++ b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EntityTypeTagGenerator.java @@ -46,6 +46,45 @@ protected void configure(RegistryWrapper.WrapperLookup registries) { getOrCreateTagBuilder(ConventionalEntityTypeTags.BOATS) .add(EntityType.BOAT) .add(EntityType.CHEST_BOAT); + getOrCreateTagBuilder(ConventionalEntityTypeTags.ANIMALS) + .add(EntityType.ARMADILLO) + .add(EntityType.AXOLOTL) + .add(EntityType.BEE) + .add(EntityType.CAMEL) + .add(EntityType.CAT) + .add(EntityType.CHICKEN) + .add(EntityType.COD) + .add(EntityType.COW) + .add(EntityType.DOLPHIN) + .add(EntityType.DONKEY) + .add(EntityType.FOX) + .add(EntityType.FROG) + .add(EntityType.GLOW_SQUID) + .add(EntityType.GOAT) + .add(EntityType.HOGLIN) + .add(EntityType.HORSE) + .add(EntityType.LLAMA) + .add(EntityType.MOOSHROOM) + .add(EntityType.MULE) + .add(EntityType.OCELOT) + .add(EntityType.PANDA) + .add(EntityType.PARROT) + .add(EntityType.PIG) + .add(EntityType.POLAR_BEAR) + .add(EntityType.PUFFERFISH) + .add(EntityType.RABBIT) + .add(EntityType.SALMON) + .add(EntityType.SHEEP) + .add(EntityType.SKELETON_HORSE) + .add(EntityType.SNIFFER) + .add(EntityType.SQUID) + .add(EntityType.STRIDER) + .add(EntityType.TADPOLE) + .add(EntityType.TRADER_LLAMA) + .add(EntityType.TROPICAL_FISH) + .add(EntityType.TURTLE) + .add(EntityType.WOLF) + .add(EntityType.ZOMBIE_HORSE); getOrCreateTagBuilder(ConventionalEntityTypeTags.CAPTURING_NOT_SUPPORTED); getOrCreateTagBuilder(ConventionalEntityTypeTags.TELEPORTING_NOT_SUPPORTED); } diff --git a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEntityTypeTags.java b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEntityTypeTags.java index f73cce5299..efd3217367 100644 --- a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEntityTypeTags.java +++ b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEntityTypeTags.java @@ -36,6 +36,7 @@ private ConventionalEntityTypeTags() { public static final TagKey> MINECARTS = register("minecarts"); public static final TagKey> BOATS = register("boats"); + public static final TagKey> ANIMALS = register("animals"); /** * Entities should be included in this tag if they are not allowed to be picked up by items or grabbed in a way From 7b93b7728bcefbe6184db97e1226216496e954f5 Mon Sep 17 00:00:00 2001 From: CammiePone Date: Tue, 15 Oct 2024 21:08:18 -0700 Subject: [PATCH 2/3] forgot to run the datagen config --- .../fabric-convention-tags-v2/lang/en_us.json | 1 + .../data/c/tags/entity_type/animals.json | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 fabric-convention-tags-v2/src/generated/resources/data/c/tags/entity_type/animals.json diff --git a/fabric-convention-tags-v2/src/generated/resources/assets/fabric-convention-tags-v2/lang/en_us.json b/fabric-convention-tags-v2/src/generated/resources/assets/fabric-convention-tags-v2/lang/en_us.json index d20e0ef315..1b8cfce7de 100644 --- a/fabric-convention-tags-v2/src/generated/resources/assets/fabric-convention-tags-v2/lang/en_us.json +++ b/fabric-convention-tags-v2/src/generated/resources/assets/fabric-convention-tags-v2/lang/en_us.json @@ -85,6 +85,7 @@ "tag.enchantment.c.increase_block_drops": "Increases Block Drops", "tag.enchantment.c.increase_entity_drops": "Increases 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/fabric-convention-tags-v2/src/generated/resources/data/c/tags/entity_type/animals.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/entity_type/animals.json new file mode 100644 index 0000000000..c6ef4b47df --- /dev/null +++ b/fabric-convention-tags-v2/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: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" + ] +} \ No newline at end of file From b66b3e86d6bbc1320f00096ba3087894dec536c4 Mon Sep 17 00:00:00 2001 From: Cammie Date: Tue, 19 Nov 2024 12:50:58 -0800 Subject: [PATCH 3/3] add javadocs for ANIMALS tag --- .../api/tag/convention/v2/ConventionalEntityTypeTags.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEntityTypeTags.java b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEntityTypeTags.java index efd3217367..a8ce5cd7d9 100644 --- a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEntityTypeTags.java +++ b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEntityTypeTags.java @@ -36,6 +36,10 @@ private ConventionalEntityTypeTags() { public static final TagKey> MINECARTS = register("minecarts"); public static final TagKey> BOATS = register("boats"); + + /** + * Tag containing entity types that extend AnimalEntity + */ public static final TagKey> ANIMALS = register("animals"); /**