From 2b43c5c8df87932d25560adfc6794de14fa803aa Mon Sep 17 00:00:00 2001 From: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> Date: Sun, 21 Apr 2024 11:35:27 -0400 Subject: [PATCH] Powder Snow Bucket tag, defense enchantment tag name fix, missing meat tag entry (#3727) * Multiple tag fixes * Make the tag rename not breaking --- .../tag/convention/ConventionLogWarnings.java | 1 + .../generators/EnchantmentTagGenerator.java | 4 ++- .../datagen/generators/ItemTagGenerator.java | 11 ++++++++ ....json => entity_defense_enhancements.json} | 6 +++- .../resources/data/c/tags/items/buckets.json | 28 +++++++++++++++++++ .../c/tags/items/buckets/powder_snow.json | 5 ++++ .../data/c/tags/items/foods/cooked_meats.json | 1 + .../data/c/tags/items/foods/raw_meats.json | 1 + .../v2/ConventionalEnchantmentTags.java | 2 +- .../convention/v2/ConventionalItemTags.java | 6 ++-- 10 files changed, 60 insertions(+), 5 deletions(-) rename fabric-convention-tags-v2/src/generated/resources/data/c/tags/enchantment/{entity_defense_enhancement.json => entity_defense_enhancements.json} (61%) create mode 100644 fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/buckets.json create mode 100644 fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/buckets/powder_snow.json diff --git a/deprecated/fabric-convention-tags-v1/src/main/java/net/fabricmc/fabric/impl/tag/convention/ConventionLogWarnings.java b/deprecated/fabric-convention-tags-v1/src/main/java/net/fabricmc/fabric/impl/tag/convention/ConventionLogWarnings.java index 0438fc6d40..73a4c3999c 100644 --- a/deprecated/fabric-convention-tags-v1/src/main/java/net/fabricmc/fabric/impl/tag/convention/ConventionLogWarnings.java +++ b/deprecated/fabric-convention-tags-v1/src/main/java/net/fabricmc/fabric/impl/tag/convention/ConventionLogWarnings.java @@ -110,6 +110,7 @@ private enum LOG_WARNING_MODES { createMapEntry(ConventionalEnchantmentTags.INCREASES_BLOCK_DROPS, net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags.INCREASE_BLOCK_DROPS), createMapEntry(ConventionalEnchantmentTags.INCREASES_ENTITY_DROPS, net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags.INCREASE_ENTITY_DROPS), createMapEntry(ConventionalEnchantmentTags.ENTITY_MOVEMENT_ENHANCEMENT, net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags.ENTITY_SPEED_ENHANCEMENTS), + createMapEntry(ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENT, net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENTS), createMapEntry(ConventionalBiomeTags.IN_NETHER, net.fabricmc.fabric.api.tag.convention.v2.ConventionalBiomeTags.IS_NETHER), createMapEntry(ConventionalBiomeTags.IN_THE_END, net.fabricmc.fabric.api.tag.convention.v2.ConventionalBiomeTags.IS_END), diff --git a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnchantmentTagGenerator.java b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnchantmentTagGenerator.java index dc43c542d3..3519cf9274 100644 --- a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnchantmentTagGenerator.java +++ b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnchantmentTagGenerator.java @@ -50,7 +50,7 @@ protected void configure(RegistryWrapper.WrapperLookup registries) { getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_AUXILIARY_MOVEMENT_ENHANCEMENTS) .add(Enchantments.FEATHER_FALLING) .add(Enchantments.FROST_WALKER); - getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENT) + getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENTS) .add(Enchantments.PROTECTION) .add(Enchantments.BLAST_PROTECTION) .add(Enchantments.PROJECTILE_PROTECTION) @@ -62,5 +62,7 @@ protected void configure(RegistryWrapper.WrapperLookup registries) { // TODO: Remove backwards compat tag entries in 1.22 getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_SPEED_ENHANCEMENTS) .addOptionalTag(new Identifier("c", "entity_movement_enhancement")); + getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENTS) + .addOptionalTag(new Identifier("c", "entity_defense_enhancement")); } } diff --git a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/ItemTagGenerator.java b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/ItemTagGenerator.java index 40cf29b67f..a47625ce30 100644 --- a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/ItemTagGenerator.java +++ b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/ItemTagGenerator.java @@ -179,6 +179,7 @@ private void generateFoodTags() { getOrCreateTagBuilder(ConventionalItemTags.RAW_MEATS_FOODS) .add(Items.BEEF) + .add(Items.PORKCHOP) .add(Items.CHICKEN) .add(Items.RABBIT) .add(Items.MUTTON); @@ -191,6 +192,7 @@ private void generateFoodTags() { getOrCreateTagBuilder(ConventionalItemTags.COOKED_MEATS_FOODS) .add(Items.COOKED_BEEF) + .add(Items.COOKED_PORKCHOP) .add(Items.COOKED_CHICKEN) .add(Items.COOKED_RABBIT) .add(Items.COOKED_MUTTON); @@ -254,6 +256,15 @@ private void generateBucketTags() { .add(Items.WATER_BUCKET); getOrCreateTagBuilder(ConventionalItemTags.MILK_BUCKETS) .add(Items.MILK_BUCKET); + getOrCreateTagBuilder(ConventionalItemTags.POWDER_SNOW_BUCKETS) + .add(Items.POWDER_SNOW_BUCKET); + getOrCreateTagBuilder(ConventionalItemTags.BUCKETS) + .addOptionalTag(ConventionalItemTags.EMPTY_BUCKETS) + .addOptionalTag(ConventionalItemTags.WATER_BUCKETS) + .addOptionalTag(ConventionalItemTags.LAVA_BUCKETS) + .addOptionalTag(ConventionalItemTags.MILK_BUCKETS) + .addOptionalTag(ConventionalItemTags.POWDER_SNOW_BUCKETS) + .addOptionalTag(ConventionalItemTags.ENTITY_WATER_BUCKETS); } private void generateOreAndRelatedTags() { diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/enchantment/entity_defense_enhancement.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/enchantment/entity_defense_enhancements.json similarity index 61% rename from fabric-convention-tags-v2/src/generated/resources/data/c/tags/enchantment/entity_defense_enhancement.json rename to fabric-convention-tags-v2/src/generated/resources/data/c/tags/enchantment/entity_defense_enhancements.json index 2af6d192e6..6e85ceaa6f 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/enchantment/entity_defense_enhancement.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/enchantment/entity_defense_enhancements.json @@ -5,6 +5,10 @@ "minecraft:projectile_protection", "minecraft:fire_protection", "minecraft:respiration", - "minecraft:feather_falling" + "minecraft:feather_falling", + { + "id": "#c:entity_defense_enhancement", + "required": false + } ] } \ No newline at end of file diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/buckets.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/buckets.json new file mode 100644 index 0000000000..ecaacd29cc --- /dev/null +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/buckets.json @@ -0,0 +1,28 @@ +{ + "values": [ + { + "id": "#c:buckets/empty", + "required": false + }, + { + "id": "#c:buckets/water", + "required": false + }, + { + "id": "#c:buckets/lava", + "required": false + }, + { + "id": "#c:buckets/milk", + "required": false + }, + { + "id": "#c:buckets/powder_snow", + "required": false + }, + { + "id": "#c:buckets/entity_water", + "required": false + } + ] +} \ No newline at end of file diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/buckets/powder_snow.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/buckets/powder_snow.json new file mode 100644 index 0000000000..399a04e712 --- /dev/null +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/buckets/powder_snow.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:powder_snow_bucket" + ] +} \ No newline at end of file diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/foods/cooked_meats.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/foods/cooked_meats.json index fe6f7f5443..ffd78dc19a 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/foods/cooked_meats.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/foods/cooked_meats.json @@ -1,6 +1,7 @@ { "values": [ "minecraft:cooked_beef", + "minecraft:cooked_porkchop", "minecraft:cooked_chicken", "minecraft:cooked_rabbit", "minecraft:cooked_mutton" diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/foods/raw_meats.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/foods/raw_meats.json index 1c57ef56bf..c548b57f3a 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/foods/raw_meats.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/items/foods/raw_meats.json @@ -1,6 +1,7 @@ { "values": [ "minecraft:beef", + "minecraft:porkchop", "minecraft:chicken", "minecraft:rabbit", "minecraft:mutton" diff --git a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEnchantmentTags.java b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEnchantmentTags.java index dc6104fe7a..a20c64c14d 100644 --- a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEnchantmentTags.java +++ b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalEnchantmentTags.java @@ -51,7 +51,7 @@ private ConventionalEnchantmentTags() { /** * For enchantments that decrease damage taken or otherwise benefit, in regard to damage, the entity wearing armor enchanted with it. */ - public static final TagKey ENTITY_DEFENSE_ENHANCEMENT = register("entity_defense_enhancement"); + public static final TagKey ENTITY_DEFENSE_ENHANCEMENTS = register("entity_defense_enhancements"); private static TagKey register(String tagId) { return TagRegistration.ENCHANTMENT_TAG.registerC(tagId); diff --git a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java index aba8979875..44ca632bfa 100644 --- a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java +++ b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java @@ -155,14 +155,16 @@ private ConventionalItemTags() { public static final TagKey FOOD_POISONING_FOODS = register("foods/food_poisoning"); // Buckets + public static final TagKey BUCKETS = register("buckets"); + public static final TagKey EMPTY_BUCKETS = register("buckets/empty"); /** * Does not include entity water buckets. */ public static final TagKey WATER_BUCKETS = register("buckets/water"); - public static final TagKey ENTITY_WATER_BUCKETS = register("buckets/entity_water"); public static final TagKey LAVA_BUCKETS = register("buckets/lava"); public static final TagKey MILK_BUCKETS = register("buckets/milk"); - public static final TagKey EMPTY_BUCKETS = register("buckets/empty"); + public static final TagKey POWDER_SNOW_BUCKETS = register("buckets/powder_snow"); + public static final TagKey ENTITY_WATER_BUCKETS = register("buckets/entity_water"); public static final TagKey BARRELS = register("barrels"); public static final TagKey WOODEN_BARRELS = register("barrels/wooden");