mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-15 00:14:28 -04:00
Add c:flowers
, c:flowers/tall
, and c:flowers/small
block and item tags (#4352)
* Add `c:flowers`, `c:flowers/tall`, and `c:flowers/small` block and item tags
* Apply spotless
* remove warning on flowers block tag
* Update fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
* Update fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
* Update fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
* remove small flower tag alias
---------
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
(cherry picked from commit dfeded7d7d
)
This commit is contained in:
parent
eaec5033d5
commit
de636c47f7
15 changed files with 214 additions and 13 deletions
deprecated/fabric-convention-tags-v1/src/main/java/net/fabricmc/fabric/impl/tag/convention
fabric-convention-tags-v2/src
datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators
generated/resources
assets/fabric-convention-tags-v2/lang
data
c/tags
fabric-convention-tags-v2/fabric/tag_aliases
main/java/net/fabricmc/fabric/api/tag/convention/v2
|
@ -217,7 +217,10 @@ public class ConventionLogWarnings implements ModInitializer {
|
|||
createMapEntry(RegistryKeys.ITEM, "candies", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.CANDY_FOODS),
|
||||
createMapEntry(RegistryKeys.ITEM, "pie", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.PIE_FOODS),
|
||||
createMapEntry(RegistryKeys.ITEM, "pies", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.PIE_FOODS),
|
||||
createMapEntry(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "music_discs")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.MUSIC_DISCS)
|
||||
createMapEntry(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "music_discs")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.MUSIC_DISCS),
|
||||
createMapEntry(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "tall_flowers")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.TALL_FLOWERS),
|
||||
createMapEntry(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "flowers")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.FLOWERS),
|
||||
createMapEntry(TagKey.of(RegistryKeys.BLOCK, Identifier.of("minecraft", "tall_flowers")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalBlockTags.TALL_FLOWERS)
|
||||
);
|
||||
|
||||
@Override
|
||||
|
|
|
@ -207,6 +207,8 @@ public final class BlockTagGenerator extends FabricTagProvider.BlockTagProvider
|
|||
|
||||
generateHeadTags();
|
||||
|
||||
generateFlowerTags();
|
||||
|
||||
generateMiscTags();
|
||||
|
||||
generateTagAlias();
|
||||
|
@ -214,6 +216,28 @@ public final class BlockTagGenerator extends FabricTagProvider.BlockTagProvider
|
|||
generateBackwardsCompatTags();
|
||||
}
|
||||
|
||||
private void generateFlowerTags() {
|
||||
getOrCreateTagBuilder(ConventionalBlockTags.SMALL_FLOWERS)
|
||||
.add(Blocks.DANDELION, Blocks.POPPY, Blocks.BLUE_ORCHID,
|
||||
Blocks.ALLIUM, Blocks.AZURE_BLUET, Blocks.RED_TULIP,
|
||||
Blocks.ORANGE_TULIP, Blocks.WHITE_TULIP, Blocks.PINK_TULIP,
|
||||
Blocks.OXEYE_DAISY, Blocks.CORNFLOWER, Blocks.LILY_OF_THE_VALLEY,
|
||||
Blocks.WITHER_ROSE, Blocks.TORCHFLOWER, Blocks.OPEN_EYEBLOSSOM,
|
||||
Blocks.CLOSED_EYEBLOSSOM
|
||||
);
|
||||
|
||||
getOrCreateTagBuilder(ConventionalBlockTags.TALL_FLOWERS)
|
||||
.add(Blocks.SUNFLOWER, Blocks.LILAC, Blocks.PEONY,
|
||||
Blocks.ROSE_BUSH, Blocks.PITCHER_PLANT
|
||||
).addOptional(Identifier.ofVanilla("tall_flowers"));
|
||||
|
||||
getOrCreateTagBuilder(ConventionalBlockTags.FLOWERS)
|
||||
.add(Blocks.FLOWERING_AZALEA_LEAVES, Blocks.FLOWERING_AZALEA, Blocks.MANGROVE_PROPAGULE,
|
||||
Blocks.PINK_PETALS, Blocks.CHORUS_FLOWER, Blocks.SPORE_BLOSSOM
|
||||
).addOptionalTag(ConventionalBlockTags.SMALL_FLOWERS)
|
||||
.addOptionalTag(ConventionalBlockTags.TALL_FLOWERS);
|
||||
}
|
||||
|
||||
private void generateMiscTags() {
|
||||
getOrCreateTagBuilder(ConventionalBlockTags.PLAYER_WORKSTATIONS_CRAFTING_TABLES)
|
||||
.add(Blocks.CRAFTING_TABLE);
|
||||
|
@ -694,6 +718,8 @@ public final class BlockTagGenerator extends FabricTagProvider.BlockTagProvider
|
|||
aliasGroup("fences").add(BlockTags.FENCES, ConventionalBlockTags.FENCES);
|
||||
aliasGroup("fences/wooden").add(BlockTags.WOODEN_FENCES, ConventionalBlockTags.WOODEN_FENCES);
|
||||
aliasGroup("fence_gates").add(BlockTags.FENCE_GATES, ConventionalBlockTags.FENCE_GATES);
|
||||
|
||||
aliasGroup("flowers").add(BlockTags.FLOWERS, ConventionalBlockTags.FLOWERS);
|
||||
}
|
||||
|
||||
private void generateBackwardsCompatTags() {
|
||||
|
|
|
@ -104,6 +104,9 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider {
|
|||
translationBuilder.add(ConventionalBlockTags.UNCOLORED_SANDSTONE_BLOCKS, "Uncolored Sandstone Blocks");
|
||||
translationBuilder.add(ConventionalBlockTags.UNCOLORED_SANDSTONE_SLABS, "Uncolored Sandstone Slabs");
|
||||
translationBuilder.add(ConventionalBlockTags.UNCOLORED_SANDSTONE_STAIRS, "Uncolored Sandstone Stairs");
|
||||
translationBuilder.add(ConventionalBlockTags.SMALL_FLOWERS, "Small Flowers");
|
||||
translationBuilder.add(ConventionalBlockTags.TALL_FLOWERS, "Tall Flowers");
|
||||
translationBuilder.add(ConventionalBlockTags.FLOWERS, "Flowers");
|
||||
translationBuilder.add(ConventionalBlockTags.FENCES, "Fences");
|
||||
translationBuilder.add(ConventionalBlockTags.WOODEN_FENCES, "Wooden Fences");
|
||||
translationBuilder.add(ConventionalBlockTags.NETHER_BRICK_FENCES, "Nether Brick Fences");
|
||||
|
@ -318,6 +321,9 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider {
|
|||
translationBuilder.add(ConventionalItemTags.UNCOLORED_SANDSTONE_BLOCKS, "Uncolored Sandstone Blocks");
|
||||
translationBuilder.add(ConventionalItemTags.UNCOLORED_SANDSTONE_SLABS, "Uncolored Sandstone Slabs");
|
||||
translationBuilder.add(ConventionalItemTags.UNCOLORED_SANDSTONE_STAIRS, "Uncolored Sandstone Stairs");
|
||||
translationBuilder.add(ConventionalItemTags.SMALL_FLOWERS, "Small Flowers");
|
||||
translationBuilder.add(ConventionalItemTags.TALL_FLOWERS, "Tall Flowers");
|
||||
translationBuilder.add(ConventionalItemTags.FLOWERS, "Flowers");
|
||||
translationBuilder.add(ConventionalItemTags.FENCES, "Fences");
|
||||
translationBuilder.add(ConventionalItemTags.WOODEN_FENCES, "Wooden Fences");
|
||||
translationBuilder.add(ConventionalItemTags.NETHER_BRICK_FENCES, "Nether Brick Fences");
|
||||
|
|
|
@ -46,6 +46,7 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider {
|
|||
generateDyedTags();
|
||||
generateCropAndSeedsTags();
|
||||
generateVillagerJobSites();
|
||||
generateFlowerTags();
|
||||
generateOtherTags();
|
||||
copyItemTags();
|
||||
generateTagAlias();
|
||||
|
@ -779,6 +780,12 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider {
|
|||
.add(Items.WHEAT_SEEDS);
|
||||
}
|
||||
|
||||
private void generateFlowerTags() {
|
||||
copy(ConventionalBlockTags.SMALL_FLOWERS, ConventionalItemTags.SMALL_FLOWERS);
|
||||
copy(ConventionalBlockTags.TALL_FLOWERS, ConventionalItemTags.TALL_FLOWERS);
|
||||
copy(ConventionalBlockTags.FLOWERS, ConventionalItemTags.FLOWERS);
|
||||
}
|
||||
|
||||
private void generateOtherTags() {
|
||||
getOrCreateTagBuilder(ConventionalItemTags.PLAYER_WORKSTATIONS_CRAFTING_TABLES)
|
||||
.add(Items.CRAFTING_TABLE);
|
||||
|
@ -978,6 +985,8 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider {
|
|||
aliasGroup("fences").add(ItemTags.FENCES, ConventionalItemTags.FENCES);
|
||||
aliasGroup("fences/wooden").add(ItemTags.WOODEN_FENCES, ConventionalItemTags.WOODEN_FENCES);
|
||||
aliasGroup("fence_gates").add(ItemTags.FENCE_GATES, ConventionalItemTags.FENCE_GATES);
|
||||
|
||||
aliasGroup("flowers/small").add(ItemTags.SMALL_FLOWERS, ConventionalItemTags.SMALL_FLOWERS);
|
||||
}
|
||||
|
||||
private void generateBackwardsCompatTags() {
|
||||
|
|
|
@ -40,6 +40,9 @@
|
|||
"tag.block.c.fences": "Fences",
|
||||
"tag.block.c.fences.nether_brick": "Nether Brick Fences",
|
||||
"tag.block.c.fences.wooden": "Wooden Fences",
|
||||
"tag.block.c.flowers": "Flowers",
|
||||
"tag.block.c.flowers.small": "Small Flowers",
|
||||
"tag.block.c.flowers.tall": "Tall Flowers",
|
||||
"tag.block.c.glass_blocks": "Glass Blocks",
|
||||
"tag.block.c.glass_blocks.cheap": "Cheap Glass Blocks",
|
||||
"tag.block.c.glass_blocks.colorless": "Colorless Glass Blocks",
|
||||
|
@ -233,6 +236,9 @@
|
|||
"tag.item.c.fences.nether_brick": "Nether Brick Fences",
|
||||
"tag.item.c.fences.wooden": "Wooden Fences",
|
||||
"tag.item.c.fertilizers": "Fertilizers",
|
||||
"tag.item.c.flowers": "Flowers",
|
||||
"tag.item.c.flowers.small": "Small Flowers",
|
||||
"tag.item.c.flowers.tall": "Tall Flowers",
|
||||
"tag.item.c.foods": "Foods",
|
||||
"tag.item.c.foods.berries": "Berries",
|
||||
"tag.item.c.foods.berry": "Berries",
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:flowering_azalea_leaves",
|
||||
"minecraft:flowering_azalea",
|
||||
"minecraft:mangrove_propagule",
|
||||
"minecraft:pink_petals",
|
||||
"minecraft:chorus_flower",
|
||||
"minecraft:spore_blossom",
|
||||
{
|
||||
"id": "#c:flowers/small",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"id": "#c:flowers/tall",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:dandelion",
|
||||
"minecraft:poppy",
|
||||
"minecraft:blue_orchid",
|
||||
"minecraft:allium",
|
||||
"minecraft:azure_bluet",
|
||||
"minecraft:red_tulip",
|
||||
"minecraft:orange_tulip",
|
||||
"minecraft:white_tulip",
|
||||
"minecraft:pink_tulip",
|
||||
"minecraft:oxeye_daisy",
|
||||
"minecraft:cornflower",
|
||||
"minecraft:lily_of_the_valley",
|
||||
"minecraft:wither_rose",
|
||||
"minecraft:torchflower",
|
||||
"minecraft:open_eyeblossom",
|
||||
"minecraft:closed_eyeblossom"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:sunflower",
|
||||
"minecraft:lilac",
|
||||
"minecraft:peony",
|
||||
"minecraft:rose_bush",
|
||||
"minecraft:pitcher_plant",
|
||||
{
|
||||
"id": "minecraft:tall_flowers",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:flowering_azalea_leaves",
|
||||
"minecraft:flowering_azalea",
|
||||
"minecraft:mangrove_propagule",
|
||||
"minecraft:pink_petals",
|
||||
"minecraft:chorus_flower",
|
||||
"minecraft:spore_blossom",
|
||||
{
|
||||
"id": "#c:flowers/small",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"id": "#c:flowers/tall",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:dandelion",
|
||||
"minecraft:poppy",
|
||||
"minecraft:blue_orchid",
|
||||
"minecraft:allium",
|
||||
"minecraft:azure_bluet",
|
||||
"minecraft:red_tulip",
|
||||
"minecraft:orange_tulip",
|
||||
"minecraft:white_tulip",
|
||||
"minecraft:pink_tulip",
|
||||
"minecraft:oxeye_daisy",
|
||||
"minecraft:cornflower",
|
||||
"minecraft:lily_of_the_valley",
|
||||
"minecraft:wither_rose",
|
||||
"minecraft:torchflower",
|
||||
"minecraft:open_eyeblossom",
|
||||
"minecraft:closed_eyeblossom"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:sunflower",
|
||||
"minecraft:lilac",
|
||||
"minecraft:peony",
|
||||
"minecraft:rose_bush",
|
||||
"minecraft:pitcher_plant",
|
||||
{
|
||||
"id": "minecraft:tall_flowers",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"tags": [
|
||||
"minecraft:flowers",
|
||||
"c:flowers"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"tags": [
|
||||
"minecraft:small_flowers",
|
||||
"c:flowers/small"
|
||||
]
|
||||
}
|
|
@ -18,7 +18,7 @@ package net.fabricmc.fabric.api.tag.convention.v2;
|
|||
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.registry.tag.ItemTags;
|
||||
import net.minecraft.registry.tag.BlockTags;
|
||||
import net.minecraft.registry.tag.TagKey;
|
||||
|
||||
import net.fabricmc.fabric.impl.tag.convention.v2.TagRegistration;
|
||||
|
@ -56,37 +56,37 @@ public final class ConventionalBlockTags {
|
|||
|
||||
// Ores - vanilla instances (All ores consolidated here for consistency)
|
||||
/**
|
||||
* Aliased with {@link ItemTags#COAL_ORES}.
|
||||
* Aliased with {@link BlockTags#COAL_ORES}.
|
||||
*/
|
||||
public static final TagKey<Block> COAL_ORES = register("ores/coal");
|
||||
/**
|
||||
* Aliased with {@link ItemTags#COPPER_ORES}.
|
||||
* Aliased with {@link BlockTags#COPPER_ORES}.
|
||||
*/
|
||||
public static final TagKey<Block> COPPER_ORES = register("ores/copper");
|
||||
/**
|
||||
* Aliased with {@link ItemTags#DIAMOND_ORES}.
|
||||
* Aliased with {@link BlockTags#DIAMOND_ORES}.
|
||||
*/
|
||||
public static final TagKey<Block> DIAMOND_ORES = register("ores/diamond");
|
||||
/**
|
||||
* Aliased with {@link ItemTags#EMERALD_ORES}.
|
||||
* Aliased with {@link BlockTags#EMERALD_ORES}.
|
||||
*/
|
||||
public static final TagKey<Block> EMERALD_ORES = register("ores/emerald");
|
||||
/**
|
||||
* Aliased with {@link ItemTags#GOLD_ORES}.
|
||||
* Aliased with {@link BlockTags#GOLD_ORES}.
|
||||
*/
|
||||
public static final TagKey<Block> GOLD_ORES = register("ores/gold");
|
||||
/**
|
||||
* Aliased with {@link ItemTags#IRON_ORES}.
|
||||
* Aliased with {@link BlockTags#IRON_ORES}.
|
||||
*/
|
||||
public static final TagKey<Block> IRON_ORES = register("ores/iron");
|
||||
/**
|
||||
* Aliased with {@link ItemTags#LAPIS_ORES}.
|
||||
* Aliased with {@link BlockTags#LAPIS_ORES}.
|
||||
*/
|
||||
public static final TagKey<Block> LAPIS_ORES = register("ores/lapis");
|
||||
public static final TagKey<Block> NETHERITE_SCRAP_ORES = register("ores/netherite_scrap");
|
||||
public static final TagKey<Block> QUARTZ_ORES = register("ores/quartz");
|
||||
/**
|
||||
* Aliased with {@link ItemTags#REDSTONE_ORES}.
|
||||
* Aliased with {@link BlockTags#REDSTONE_ORES}.
|
||||
*/
|
||||
public static final TagKey<Block> REDSTONE_ORES = register("ores/redstone");
|
||||
|
||||
|
@ -130,6 +130,25 @@ public final class ConventionalBlockTags {
|
|||
public static final TagKey<Block> RED_SANDS = register("sands/red");
|
||||
public static final TagKey<Block> COLORLESS_SANDS = register("sands/colorless");
|
||||
|
||||
// Flower
|
||||
/**
|
||||
* Contains living ground-based flowers that are 1 block tall such as Dandelions or Poppy.
|
||||
* Equivalent to the "minecraft:small_flowers" block tag.
|
||||
* This is NOT aliased with {@link BlockTags#SMALL_FLOWERS} because the vanilla tag is used to make the block weak to swords.
|
||||
*/
|
||||
public static final TagKey<Block> SMALL_FLOWERS = register("flowers/small");
|
||||
/**
|
||||
* Contains living ground-based flowers that are 2 block tall such as Rose Bush or Peony.
|
||||
* Equivalent to the "minecraft:tall_flowers" block tag in past Minecraft version.
|
||||
*/
|
||||
public static final TagKey<Block> TALL_FLOWERS = register("flowers/tall");
|
||||
/**
|
||||
* Contains any living plant block that contains flowers or is a flower itself.
|
||||
* Equivalent to the "minecraft:flowers" block tag.
|
||||
* Aliased with {@link BlockTags#FLOWERS}.
|
||||
*/
|
||||
public static final TagKey<Block> FLOWERS = register("flowers");
|
||||
|
||||
// Sandstone
|
||||
public static final TagKey<Block> SANDSTONE_BLOCKS = register("sandstone/blocks");
|
||||
public static final TagKey<Block> SANDSTONE_SLABS = register("sandstone/slabs");
|
||||
|
@ -143,16 +162,16 @@ public final class ConventionalBlockTags {
|
|||
|
||||
// Fences and Fence Gates
|
||||
/**
|
||||
* Aliased with {@link ItemTags#FENCES}.
|
||||
* Aliased with {@link BlockTags#FENCES}.
|
||||
*/
|
||||
public static final TagKey<Block> FENCES = register("fences");
|
||||
/**
|
||||
* Aliased with {@link ItemTags#WOODEN_FENCES}.
|
||||
* Aliased with {@link BlockTags#WOODEN_FENCES}.
|
||||
*/
|
||||
public static final TagKey<Block> WOODEN_FENCES = register("fences/wooden");
|
||||
public static final TagKey<Block> NETHER_BRICK_FENCES = register("fences/nether_brick");
|
||||
/**
|
||||
* Aliased with {@link ItemTags#FENCE_GATES}.
|
||||
* Aliased with {@link BlockTags#FENCE_GATES}.
|
||||
*/
|
||||
public static final TagKey<Block> FENCE_GATES = register("fence_gates");
|
||||
public static final TagKey<Block> WOODEN_FENCE_GATES = register("fence_gates/wooden");
|
||||
|
|
|
@ -308,6 +308,24 @@ public final class ConventionalItemTags {
|
|||
public static final TagKey<Item> UNCOLORED_SANDSTONE_SLABS = register("sandstone/uncolored_slabs");
|
||||
public static final TagKey<Item> UNCOLORED_SANDSTONE_STAIRS = register("sandstone/uncolored_stairs");
|
||||
|
||||
// Flower
|
||||
/**
|
||||
* Contains living ground-based flowers that are 1 block tall such as Dandelions or Poppy.
|
||||
* Equivalent to the {@code minecraft:small_flowers} item tag.
|
||||
* Aliased with {@link ItemTags#SMALL_FLOWERS}.
|
||||
*/
|
||||
public static final TagKey<Item> SMALL_FLOWERS = register("flowers/small");
|
||||
/**
|
||||
* Contains living ground-based flowers that are 2 block tall such as Rose Bush or Peony.
|
||||
* Equivalent to the {@code minecraft:tall_flowers} item tag in past Minecraft versions.
|
||||
*/
|
||||
public static final TagKey<Item> TALL_FLOWERS = register("flowers/tall");
|
||||
/**
|
||||
* Contains any living plant block that contains flowers or is a flower itself.
|
||||
* Equivalent to the {@code minecraft:flowers} item tag in past Minecraft versions.
|
||||
*/
|
||||
public static final TagKey<Item> FLOWERS = register("flowers");
|
||||
|
||||
// Fences and Fence Gates
|
||||
/**
|
||||
* Aliased with {@link ItemTags#FENCES}.
|
||||
|
|
Loading…
Add table
Reference in a new issue