From c5e2b5c62da5e7741905a121eb80afc3dbb2f155 Mon Sep 17 00:00:00 2001 From: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> Date: Sun, 4 Aug 2024 08:52:29 -0400 Subject: [PATCH] Add `c:slime_balls` tag, add more melee weapons to melee tag, add `c:fertilizers` tag, fix entries for some biome and food tags (#3957) * Add slimeball tag closes https://github.com/FabricMC/fabric/issues/3946 * Add sparse jungle to sparse tag * add all melee weapons to melee tag closes https://github.com/FabricMC/fabric/issues/3949 * fixed name of attribute * Add c:fertilizers tag closes https://github.com/FabricMC/fabric/issues/3956 * adjust ranged tag javadoc * Update fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java Co-authored-by: Chocohead * Update fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java Co-authored-by: Chocohead * rename slime ball to match translation name * Add missing is cold biomes (less than 0.5 temperature) * Move melon to fruits tag and remove glistering melon from golden tag * Fixed fertilizers javadoc * Undo melee tag change * Put slimeballs tag back to no space * Revert "Put slimeballs tag back to no space" This reverts commit 2ca4b25917658e1be3e2576d9983233afab5e3c6. --------- Co-authored-by: Chocohead --- .../datagen/generators/BiomeTagGenerator.java | 6 ++++++ .../generators/EnglishTagLangGenerator.java | 2 ++ .../datagen/generators/ItemTagGenerator.java | 18 ++++++++++++------ .../fabric-convention-tags-v2/lang/en_us.json | 2 ++ .../data/c/tags/item/fertilizers.json | 5 +++++ .../data/c/tags/item/foods/fruit.json | 1 + .../data/c/tags/item/foods/fruits.json | 3 ++- .../data/c/tags/item/foods/golden.json | 3 +-- .../data/c/tags/item/foods/vegetable.json | 1 - .../data/c/tags/item/foods/vegetables.json | 1 - .../data/c/tags/item/slime_balls.json | 5 +++++ .../data/c/tags/item/tools/melee_weapon.json | 3 ++- .../tags/worldgen/biome/is_cold/overworld.json | 5 +++++ .../biome/is_sparse_vegetation/overworld.json | 1 + .../convention/v2/ConventionalItemTags.java | 18 ++++++++++++++++++ 15 files changed, 62 insertions(+), 12 deletions(-) create mode 100644 fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/fertilizers.json create mode 100644 fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/slime_balls.json diff --git a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/BiomeTagGenerator.java b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/BiomeTagGenerator.java index 2cd28f6a9..b6c7b311f 100644 --- a/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/BiomeTagGenerator.java +++ b/fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/BiomeTagGenerator.java @@ -142,12 +142,17 @@ public final class BiomeTagGenerator extends FabricTagProvider { getOrCreateTagBuilder(ConventionalBiomeTags.IS_COLD_OVERWORLD) .add(BiomeKeys.TAIGA) .add(BiomeKeys.OLD_GROWTH_PINE_TAIGA) + .add(BiomeKeys.OLD_GROWTH_SPRUCE_TAIGA) + .add(BiomeKeys.WINDSWEPT_HILLS) + .add(BiomeKeys.WINDSWEPT_GRAVELLY_HILLS) + .add(BiomeKeys.WINDSWEPT_FOREST) .add(BiomeKeys.SNOWY_PLAINS) .add(BiomeKeys.ICE_SPIKES) .add(BiomeKeys.GROVE) .add(BiomeKeys.SNOWY_SLOPES) .add(BiomeKeys.JAGGED_PEAKS) .add(BiomeKeys.FROZEN_PEAKS) + .add(BiomeKeys.STONY_SHORE) .add(BiomeKeys.SNOWY_BEACH) .add(BiomeKeys.SNOWY_TAIGA) .add(BiomeKeys.FROZEN_RIVER) @@ -254,6 +259,7 @@ public final class BiomeTagGenerator extends FabricTagProvider { .add(BiomeKeys.WOODED_BADLANDS) .add(BiomeKeys.SAVANNA) .add(BiomeKeys.SAVANNA_PLATEAU) + .add(BiomeKeys.SPARSE_JUNGLE) .add(BiomeKeys.WINDSWEPT_SAVANNA) .add(BiomeKeys.WINDSWEPT_FOREST) .add(BiomeKeys.WINDSWEPT_HILLS) 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 3b8046482..ac9adfec9 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 @@ -301,6 +301,8 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider { translationBuilder.add(ConventionalItemTags.ROPES, "Ropes"); translationBuilder.add(ConventionalItemTags.CHAINS, "Chains"); translationBuilder.add(ConventionalItemTags.ENDER_PEARLS, "Ender Pearls"); + translationBuilder.add(ConventionalItemTags.SLIME_BALLS, "Slimeballs"); + translationBuilder.add(ConventionalItemTags.FERTILIZERS, "Fertilizers"); translationBuilder.add(ConventionalItemTags.HIDDEN_FROM_RECIPE_VIEWERS, "Hidden From Recipe Viewers"); // Enchantments 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 afca63c73..648afd90a 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 @@ -218,13 +218,13 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider { .add(Items.APPLE) .add(Items.GOLDEN_APPLE) .add(Items.ENCHANTED_GOLDEN_APPLE) + .add(Items.MELON_SLICE) .addOptionalTag(ConventionalItemTags.FRUITS_FOODS); getOrCreateTagBuilder(ConventionalItemTags.VEGETABLE_FOODS) .add(Items.CARROT) .add(Items.GOLDEN_CARROT) .add(Items.POTATO) - .add(Items.MELON_SLICE) .add(Items.BEETROOT) .addOptionalTag(ConventionalItemTags.VEGETABLES_FOODS); @@ -282,8 +282,7 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider { getOrCreateTagBuilder(ConventionalItemTags.GOLDEN_FOODS) .add(Items.GOLDEN_APPLE) .add(Items.ENCHANTED_GOLDEN_APPLE) - .add(Items.GOLDEN_CARROT) - .add(Items.GLISTERING_MELON_SLICE); + .add(Items.GOLDEN_CARROT); getOrCreateTagBuilder(ConventionalItemTags.EDIBLE_WHEN_PLACED_FOODS) .add(Items.CAKE); @@ -320,13 +319,13 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider { getOrCreateTagBuilder(ConventionalItemTags.FRUITS_FOODS) .add(Items.APPLE) .add(Items.GOLDEN_APPLE) - .add(Items.ENCHANTED_GOLDEN_APPLE); + .add(Items.ENCHANTED_GOLDEN_APPLE) + .add(Items.MELON_SLICE); getOrCreateTagBuilder(ConventionalItemTags.VEGETABLES_FOODS) .add(Items.CARROT) .add(Items.GOLDEN_CARROT) .add(Items.POTATO) - .add(Items.MELON_SLICE) .add(Items.BEETROOT); getOrCreateTagBuilder(ConventionalItemTags.BERRIES_FOODS) @@ -549,6 +548,8 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider { .addOptionalTag(ConventionalItemTags.MINING_TOOLS); getOrCreateTagBuilder(ConventionalItemTags.MELEE_WEAPON_TOOLS) + .add(Items.MACE) + .add(Items.TRIDENT) .add(Items.WOODEN_SWORD) .add(Items.STONE_SWORD) .add(Items.GOLDEN_SWORD) @@ -561,7 +562,6 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider { .add(Items.IRON_AXE) .add(Items.DIAMOND_AXE) .add(Items.NETHERITE_AXE) - .add(Items.MACE) .addOptionalTag(ConventionalItemTags.MELEE_WEAPONS_TOOLS); getOrCreateTagBuilder(ConventionalItemTags.RANGED_WEAPON_TOOLS) @@ -684,6 +684,12 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider { getOrCreateTagBuilder(ConventionalItemTags.ENDER_PEARLS) .add(Items.ENDER_PEARL); + getOrCreateTagBuilder(ConventionalItemTags.SLIME_BALLS) + .add(Items.SLIME_BALL); + + getOrCreateTagBuilder(ConventionalItemTags.FERTILIZERS) + .add(Items.BONE_MEAL); + getOrCreateTagBuilder(ConventionalItemTags.HIDDEN_FROM_RECIPE_VIEWERS); // Generate tag so others can see it exists through 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 44f2493d8..003fa190a 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 @@ -155,6 +155,7 @@ "tag.item.c.dyes.yellow": "Yellow Dyes", "tag.item.c.enchantables": "Enchantables", "tag.item.c.ender_pearls": "Ender Pearls", + "tag.item.c.fertilizers": "Fertilizers", "tag.item.c.foods": "Foods", "tag.item.c.foods.berries": "Berries", "tag.item.c.foods.berry": "Berries", @@ -234,6 +235,7 @@ "tag.item.c.sandstone.uncolored_slabs": "Uncolored Sandstone Slabs", "tag.item.c.sandstone.uncolored_stairs": "Uncolored Sandstone Stairs", "tag.item.c.shulker_boxes": "Shulker Boxes", + "tag.item.c.slime_balls": "Slimeballs", "tag.item.c.stones": "Stones", "tag.item.c.storage_blocks": "Storage Blocks", "tag.item.c.storage_blocks.bone_meal": "Bone Meal Storage Blocks", diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/fertilizers.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/fertilizers.json new file mode 100644 index 000000000..b2fdb9915 --- /dev/null +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/fertilizers.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:bone_meal" + ] +} \ No newline at end of file diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/fruit.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/fruit.json index 9860c9bbb..d8703e8ed 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/fruit.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/fruit.json @@ -3,6 +3,7 @@ "minecraft:apple", "minecraft:golden_apple", "minecraft:enchanted_golden_apple", + "minecraft:melon_slice", { "id": "#c:foods/fruits", "required": false diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/fruits.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/fruits.json index 895ad4a31..80d118d01 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/fruits.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/fruits.json @@ -2,6 +2,7 @@ "values": [ "minecraft:apple", "minecraft:golden_apple", - "minecraft:enchanted_golden_apple" + "minecraft:enchanted_golden_apple", + "minecraft:melon_slice" ] } \ No newline at end of file diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/golden.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/golden.json index 109e7d600..da323315a 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/golden.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/golden.json @@ -2,7 +2,6 @@ "values": [ "minecraft:golden_apple", "minecraft:enchanted_golden_apple", - "minecraft:golden_carrot", - "minecraft:glistering_melon_slice" + "minecraft:golden_carrot" ] } \ No newline at end of file diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/vegetable.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/vegetable.json index e1bc7cfb0..c6ae447d5 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/vegetable.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/vegetable.json @@ -3,7 +3,6 @@ "minecraft:carrot", "minecraft:golden_carrot", "minecraft:potato", - "minecraft:melon_slice", "minecraft:beetroot", { "id": "#c:foods/vegetables", diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/vegetables.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/vegetables.json index 0476304c8..17ecdb1ca 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/vegetables.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/foods/vegetables.json @@ -3,7 +3,6 @@ "minecraft:carrot", "minecraft:golden_carrot", "minecraft:potato", - "minecraft:melon_slice", "minecraft:beetroot" ] } \ No newline at end of file diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/slime_balls.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/slime_balls.json new file mode 100644 index 000000000..533c25d91 --- /dev/null +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/slime_balls.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:slime_ball" + ] +} \ No newline at end of file diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/tools/melee_weapon.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/tools/melee_weapon.json index 554fdf0b7..04adfc134 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/tools/melee_weapon.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/item/tools/melee_weapon.json @@ -1,5 +1,7 @@ { "values": [ + "minecraft:mace", + "minecraft:trident", "minecraft:wooden_sword", "minecraft:stone_sword", "minecraft:golden_sword", @@ -12,7 +14,6 @@ "minecraft:iron_axe", "minecraft:diamond_axe", "minecraft:netherite_axe", - "minecraft:mace", { "id": "#c:tools/melee_weapons", "required": false diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/worldgen/biome/is_cold/overworld.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/worldgen/biome/is_cold/overworld.json index dce4ac923..8f21d4f44 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/worldgen/biome/is_cold/overworld.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/worldgen/biome/is_cold/overworld.json @@ -2,12 +2,17 @@ "values": [ "minecraft:taiga", "minecraft:old_growth_pine_taiga", + "minecraft:old_growth_spruce_taiga", + "minecraft:windswept_hills", + "minecraft:windswept_gravelly_hills", + "minecraft:windswept_forest", "minecraft:snowy_plains", "minecraft:ice_spikes", "minecraft:grove", "minecraft:snowy_slopes", "minecraft:jagged_peaks", "minecraft:frozen_peaks", + "minecraft:stony_shore", "minecraft:snowy_beach", "minecraft:snowy_taiga", "minecraft:frozen_river", diff --git a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/worldgen/biome/is_sparse_vegetation/overworld.json b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/worldgen/biome/is_sparse_vegetation/overworld.json index a9d66dafd..c8af0340b 100644 --- a/fabric-convention-tags-v2/src/generated/resources/data/c/tags/worldgen/biome/is_sparse_vegetation/overworld.json +++ b/fabric-convention-tags-v2/src/generated/resources/data/c/tags/worldgen/biome/is_sparse_vegetation/overworld.json @@ -3,6 +3,7 @@ "minecraft:wooded_badlands", "minecraft:savanna", "minecraft:savanna_plateau", + "minecraft:sparse_jungle", "minecraft:windswept_savanna", "minecraft:windswept_forest", "minecraft:windswept_hills", 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 a7c86b1fa..1cfbb201e 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 @@ -57,8 +57,20 @@ public final class ConventionalItemTags { public static final TagKey MACE_TOOLS = register("tools/mace"); // Action-based tool tags + /** + * A tag containing melee-based weapons for recipes and loot tables. + * Tools are considered melee if they are intentionally intended to be used for melee attack as a primary purpose. + * (In other words, Pickaxes are not melee weapons as they are not intended to be a weapon as a primary purpose) + */ public static final TagKey MELEE_WEAPON_TOOLS = register("tools/melee_weapon"); + /** + * A tag containing ranged-based weapons for recipes and loot tables. + * Tools are considered ranged if they can damage entities beyond the weapon's and player's melee attack range. + */ public static final TagKey RANGED_WEAPON_TOOLS = register("tools/ranged_weapon"); + /** + * A tag containing mining-based tools for recipes and loot tables. + */ public static final TagKey MINING_TOOL_TOOLS = register("tools/mining_tool"); // Armor tags @@ -313,6 +325,12 @@ public final class ConventionalItemTags { public static final TagKey ROPES = register("ropes"); public static final TagKey CHAINS = register("chains"); public static final TagKey ENDER_PEARLS = register("ender_pearls"); + public static final TagKey SLIME_BALLS = register("slime_balls"); + /** + * For bonemeal-like items that can grow plants. + * (Note: Could include durability-based modded bonemeal-like items. Check for durability {@link net.minecraft.component.DataComponentTypes#DAMAGE} to handle them properly) + */ + public static final TagKey FERTILIZERS = register("fertilizers"); /** * Tag that holds all items that recipe viewers should not show to users.