Skip to content

Commit

Permalink
Fix some new tags not being plural (#3848)
Browse files Browse the repository at this point in the history
* Fix new tags not being plural

Fixes #3807

Matches neoforged/NeoForge#1030

* Fixed concrete and terracotta

* Update fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/api/tag/convention/v2/ConventionalItemTags.java

Co-authored-by: haykam821 <[email protected]>

* Update fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnglishTagLangGenerator.java

Co-authored-by: haykam821 <[email protected]>

* Update fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnglishTagLangGenerator.java

Co-authored-by: haykam821 <[email protected]>

* Update fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnglishTagLangGenerator.java

Co-authored-by: haykam821 <[email protected]>

* Update fabric-convention-tags-v2/src/datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators/EnglishTagLangGenerator.java

Co-authored-by: haykam821 <[email protected]>

* regen data

---------

Co-authored-by: haykam821 <[email protected]>
  • Loading branch information
TelepathicGrunt and haykam821 authored Jun 17, 2024
1 parent ab7edba commit 8a3b561
Show file tree
Hide file tree
Showing 11 changed files with 222 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,23 @@ private void generateGlassTags() {
}

private void generateGlazeTerracottaTags() {
getOrCreateTagBuilder(ConventionalBlockTags.GLAZED_TERRACOTTAS)
.add(Blocks.WHITE_GLAZED_TERRACOTTA)
.add(Blocks.ORANGE_GLAZED_TERRACOTTA)
.add(Blocks.MAGENTA_GLAZED_TERRACOTTA)
.add(Blocks.LIGHT_BLUE_GLAZED_TERRACOTTA)
.add(Blocks.YELLOW_GLAZED_TERRACOTTA)
.add(Blocks.LIME_GLAZED_TERRACOTTA)
.add(Blocks.PINK_GLAZED_TERRACOTTA)
.add(Blocks.GRAY_GLAZED_TERRACOTTA)
.add(Blocks.LIGHT_GRAY_GLAZED_TERRACOTTA)
.add(Blocks.CYAN_GLAZED_TERRACOTTA)
.add(Blocks.PURPLE_GLAZED_TERRACOTTA)
.add(Blocks.BLUE_GLAZED_TERRACOTTA)
.add(Blocks.BROWN_GLAZED_TERRACOTTA)
.add(Blocks.GREEN_GLAZED_TERRACOTTA)
.add(Blocks.BLACK_GLAZED_TERRACOTTA)
.add(Blocks.RED_GLAZED_TERRACOTTA);
getOrCreateTagBuilder(ConventionalBlockTags.GLAZED_TERRACOTTA)
.add(Blocks.WHITE_GLAZED_TERRACOTTA)
.add(Blocks.ORANGE_GLAZED_TERRACOTTA)
Expand All @@ -244,6 +261,23 @@ private void generateGlazeTerracottaTags() {
}

private void generateConcreteTags() {
getOrCreateTagBuilder(ConventionalBlockTags.CONCRETES)
.add(Blocks.WHITE_CONCRETE)
.add(Blocks.ORANGE_CONCRETE)
.add(Blocks.MAGENTA_CONCRETE)
.add(Blocks.LIGHT_BLUE_CONCRETE)
.add(Blocks.YELLOW_CONCRETE)
.add(Blocks.LIME_CONCRETE)
.add(Blocks.PINK_CONCRETE)
.add(Blocks.GRAY_CONCRETE)
.add(Blocks.LIGHT_GRAY_CONCRETE)
.add(Blocks.CYAN_CONCRETE)
.add(Blocks.PURPLE_CONCRETE)
.add(Blocks.BLUE_CONCRETE)
.add(Blocks.BROWN_CONCRETE)
.add(Blocks.GREEN_CONCRETE)
.add(Blocks.BLACK_CONCRETE)
.add(Blocks.RED_CONCRETE);
getOrCreateTagBuilder(ConventionalBlockTags.CONCRETE)
.add(Blocks.WHITE_CONCRETE)
.add(Blocks.ORANGE_CONCRETE)
Expand Down Expand Up @@ -482,5 +516,7 @@ private void generateBackwardsCompatTags() {
getOrCreateTagBuilder(ConventionalBlockTags.UNCOLORED_SANDSTONE_BLOCKS).addOptionalTag(Identifier.of(TagUtil.C_TAG_NAMESPACE, "uncolored_sandstone_blocks"));
getOrCreateTagBuilder(ConventionalBlockTags.UNCOLORED_SANDSTONE_SLABS).addOptionalTag(Identifier.of(TagUtil.C_TAG_NAMESPACE, "uncolored_sandstone_slabs"));
getOrCreateTagBuilder(ConventionalBlockTags.UNCOLORED_SANDSTONE_STAIRS).addOptionalTag(Identifier.of(TagUtil.C_TAG_NAMESPACE, "uncolored_sandstone_stairs"));
getOrCreateTagBuilder(ConventionalBlockTags.GLAZED_TERRACOTTAS).addOptionalTag(ConventionalBlockTags.GLAZED_TERRACOTTA);
getOrCreateTagBuilder(ConventionalBlockTags.CONCRETES).addOptionalTag(ConventionalBlockTags.CONCRETE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ public void generateTranslations(RegistryWrapper.WrapperLookup registryLookup, T
translationBuilder.add(ConventionalBlockTags.WOODEN_CHESTS, "Wooden Chests");
translationBuilder.add(ConventionalBlockTags.GLASS_BLOCKS, "Glass Blocks");
translationBuilder.add(ConventionalBlockTags.GLASS_PANES, "Glass Panes");
translationBuilder.add(ConventionalBlockTags.GLAZED_TERRACOTTA, "Glaze Terracotta");
translationBuilder.add(ConventionalBlockTags.SHULKER_BOXES, "Shulker Boxes");
translationBuilder.add(ConventionalBlockTags.GLAZED_TERRACOTTAS, "Glazed Terracottas");
translationBuilder.add(ConventionalBlockTags.CONCRETES, "Concretes");
translationBuilder.add(ConventionalBlockTags.GLAZED_TERRACOTTA, "Glazed Terracotta");
translationBuilder.add(ConventionalBlockTags.CONCRETE, "Concrete");
translationBuilder.add(ConventionalBlockTags.BUDDING_BLOCKS, "Budding Blocks");
translationBuilder.add(ConventionalBlockTags.BUDS, "Buds");
Expand Down Expand Up @@ -194,10 +196,13 @@ public void generateTranslations(RegistryWrapper.WrapperLookup registryLookup, T
translationBuilder.add(ConventionalItemTags.WOODEN_CHESTS, "Wooden Chests");
translationBuilder.add(ConventionalItemTags.GLASS_BLOCKS, "Glass Blocks");
translationBuilder.add(ConventionalItemTags.GLASS_PANES, "Glass Panes");
translationBuilder.add(ConventionalItemTags.GLAZED_TERRACOTTA, "Glaze Terracotta");
translationBuilder.add(ConventionalItemTags.SHULKER_BOXES, "Shulker Boxes");
translationBuilder.add(ConventionalItemTags.GLAZED_TERRACOTTAS, "Glazed Terracottas");
translationBuilder.add(ConventionalItemTags.CONCRETES, "Concretes");
translationBuilder.add(ConventionalItemTags.CONCRETE_POWDERS, "Concrete Powders");
translationBuilder.add(ConventionalItemTags.CONCRETE, "Concrete");
translationBuilder.add(ConventionalItemTags.CONCRETE_POWDER, "Concrete Powder");
translationBuilder.add(ConventionalItemTags.GLAZED_TERRACOTTA, "Glazed Terracotta");
translationBuilder.add(ConventionalItemTags.BUDDING_BLOCKS, "Budding Blocks");
translationBuilder.add(ConventionalItemTags.BUDS, "Buds");
translationBuilder.add(ConventionalItemTags.CLUSTERS, "Clusters");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ private void copyItemTags() {
copy(ConventionalBlockTags.WOODEN_CHESTS, ConventionalItemTags.WOODEN_CHESTS);
copy(ConventionalBlockTags.GLASS_BLOCKS, ConventionalItemTags.GLASS_BLOCKS);
copy(ConventionalBlockTags.GLASS_PANES, ConventionalItemTags.GLASS_PANES);
copy(ConventionalBlockTags.GLAZED_TERRACOTTA, ConventionalItemTags.GLAZED_TERRACOTTA);
getOrCreateTagBuilder(ConventionalItemTags.SHULKER_BOXES)
.add(Items.SHULKER_BOX)
.add(Items.WHITE_SHULKER_BOX)
Expand All @@ -79,7 +78,27 @@ private void copyItemTags() {
.add(Items.GREEN_SHULKER_BOX)
.add(Items.RED_SHULKER_BOX)
.add(Items.BLACK_SHULKER_BOX);
copy(ConventionalBlockTags.GLAZED_TERRACOTTAS, ConventionalItemTags.GLAZED_TERRACOTTAS);
copy(ConventionalBlockTags.GLAZED_TERRACOTTA, ConventionalItemTags.GLAZED_TERRACOTTA);
copy(ConventionalBlockTags.CONCRETES, ConventionalItemTags.CONCRETES);
copy(ConventionalBlockTags.CONCRETE, ConventionalItemTags.CONCRETE);
getOrCreateTagBuilder(ConventionalItemTags.CONCRETE_POWDERS)
.add(Items.WHITE_CONCRETE_POWDER)
.add(Items.ORANGE_CONCRETE_POWDER)
.add(Items.MAGENTA_CONCRETE_POWDER)
.add(Items.LIGHT_BLUE_CONCRETE_POWDER)
.add(Items.YELLOW_CONCRETE_POWDER)
.add(Items.LIME_CONCRETE_POWDER)
.add(Items.PINK_CONCRETE_POWDER)
.add(Items.GRAY_CONCRETE_POWDER)
.add(Items.LIGHT_GRAY_CONCRETE_POWDER)
.add(Items.CYAN_CONCRETE_POWDER)
.add(Items.PURPLE_CONCRETE_POWDER)
.add(Items.BLUE_CONCRETE_POWDER)
.add(Items.BROWN_CONCRETE_POWDER)
.add(Items.GREEN_CONCRETE_POWDER)
.add(Items.RED_CONCRETE_POWDER)
.add(Items.BLACK_CONCRETE_POWDER);
getOrCreateTagBuilder(ConventionalItemTags.CONCRETE_POWDER)
.add(Items.WHITE_CONCRETE_POWDER)
.add(Items.ORANGE_CONCRETE_POWDER)
Expand Down Expand Up @@ -733,5 +752,6 @@ private void generateBackwardsCompatTags() {
getOrCreateTagBuilder(ConventionalItemTags.BOW_TOOLS).addOptionalTag(Identifier.of(TagUtil.C_TAG_NAMESPACE, "bows"));
getOrCreateTagBuilder(ConventionalItemTags.SHIELD_TOOLS).addOptionalTag(Identifier.of(TagUtil.C_TAG_NAMESPACE, "shields"));
getOrCreateTagBuilder(ConventionalItemTags.STRINGS).addOptionalTag(Identifier.of(TagUtil.C_TAG_NAMESPACE, "string"));
getOrCreateTagBuilder(ConventionalItemTags.CONCRETE_POWDERS).addOptionalTag(ConventionalItemTags.CONCRETE_POWDER);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"tag.block.c.clusters": "Clusters",
"tag.block.c.cobblestones": "Cobblestones",
"tag.block.c.concrete": "Concrete",
"tag.block.c.concretes": "Concretes",
"tag.block.c.dyed": "Dyed Blocks",
"tag.block.c.dyed.black": "Black Dyed Blocks",
"tag.block.c.dyed.blue": "Blue Dyed Blocks",
Expand All @@ -29,7 +30,8 @@
"tag.block.c.dyed.yellow": "Yellow Dyed Blocks",
"tag.block.c.glass_blocks": "Glass Blocks",
"tag.block.c.glass_panes": "Glass Panes",
"tag.block.c.glazed_terracotta": "Glaze Terracotta",
"tag.block.c.glazed_terracotta": "Glazed Terracotta",
"tag.block.c.glazed_terracottas": "Glazed Terracottas",
"tag.block.c.hidden_from_recipe_viewers": "Hidden From Recipe Viewers",
"tag.block.c.ores": "Ores",
"tag.block.c.ores.netherite_scrap": "Netherite Scrap Ores",
Expand Down Expand Up @@ -108,6 +110,8 @@
"tag.item.c.cobblestones": "Cobblestones",
"tag.item.c.concrete": "Concrete",
"tag.item.c.concrete_powder": "Concrete Powder",
"tag.item.c.concrete_powders": "Concrete Powders",
"tag.item.c.concretes": "Concretes",
"tag.item.c.dusts": "Dusts",
"tag.item.c.dusts.glowstone": "Glowstone Dusts",
"tag.item.c.dusts.redstone": "Redstone Dusts",
Expand Down Expand Up @@ -169,7 +173,8 @@
"tag.item.c.gems.quartz": "Quartz Gems",
"tag.item.c.glass_blocks": "Glass Blocks",
"tag.item.c.glass_panes": "Glass Panes",
"tag.item.c.glazed_terracotta": "Glaze Terracotta",
"tag.item.c.glazed_terracotta": "Glazed Terracotta",
"tag.item.c.glazed_terracottas": "Glazed Terracottas",
"tag.item.c.hidden_from_recipe_viewers": "Hidden From Recipe Viewers",
"tag.item.c.ingots": "Ingots",
"tag.item.c.ingots.copper": "Copper Ingots",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"values": [
"minecraft:white_concrete",
"minecraft:orange_concrete",
"minecraft:magenta_concrete",
"minecraft:light_blue_concrete",
"minecraft:yellow_concrete",
"minecraft:lime_concrete",
"minecraft:pink_concrete",
"minecraft:gray_concrete",
"minecraft:light_gray_concrete",
"minecraft:cyan_concrete",
"minecraft:purple_concrete",
"minecraft:blue_concrete",
"minecraft:brown_concrete",
"minecraft:green_concrete",
"minecraft:black_concrete",
"minecraft:red_concrete",
{
"id": "#c:concrete",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"values": [
"minecraft:white_glazed_terracotta",
"minecraft:orange_glazed_terracotta",
"minecraft:magenta_glazed_terracotta",
"minecraft:light_blue_glazed_terracotta",
"minecraft:yellow_glazed_terracotta",
"minecraft:lime_glazed_terracotta",
"minecraft:pink_glazed_terracotta",
"minecraft:gray_glazed_terracotta",
"minecraft:light_gray_glazed_terracotta",
"minecraft:cyan_glazed_terracotta",
"minecraft:purple_glazed_terracotta",
"minecraft:blue_glazed_terracotta",
"minecraft:brown_glazed_terracotta",
"minecraft:green_glazed_terracotta",
"minecraft:black_glazed_terracotta",
"minecraft:red_glazed_terracotta",
{
"id": "#c:glazed_terracotta",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"values": [
"minecraft:white_concrete_powder",
"minecraft:orange_concrete_powder",
"minecraft:magenta_concrete_powder",
"minecraft:light_blue_concrete_powder",
"minecraft:yellow_concrete_powder",
"minecraft:lime_concrete_powder",
"minecraft:pink_concrete_powder",
"minecraft:gray_concrete_powder",
"minecraft:light_gray_concrete_powder",
"minecraft:cyan_concrete_powder",
"minecraft:purple_concrete_powder",
"minecraft:blue_concrete_powder",
"minecraft:brown_concrete_powder",
"minecraft:green_concrete_powder",
"minecraft:red_concrete_powder",
"minecraft:black_concrete_powder",
{
"id": "#c:concrete_powder",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"values": [
"minecraft:white_concrete",
"minecraft:orange_concrete",
"minecraft:magenta_concrete",
"minecraft:light_blue_concrete",
"minecraft:yellow_concrete",
"minecraft:lime_concrete",
"minecraft:pink_concrete",
"minecraft:gray_concrete",
"minecraft:light_gray_concrete",
"minecraft:cyan_concrete",
"minecraft:purple_concrete",
"minecraft:blue_concrete",
"minecraft:brown_concrete",
"minecraft:green_concrete",
"minecraft:black_concrete",
"minecraft:red_concrete",
{
"id": "#c:concrete",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"values": [
"minecraft:white_glazed_terracotta",
"minecraft:orange_glazed_terracotta",
"minecraft:magenta_glazed_terracotta",
"minecraft:light_blue_glazed_terracotta",
"minecraft:yellow_glazed_terracotta",
"minecraft:lime_glazed_terracotta",
"minecraft:pink_glazed_terracotta",
"minecraft:gray_glazed_terracotta",
"minecraft:light_gray_glazed_terracotta",
"minecraft:cyan_glazed_terracotta",
"minecraft:purple_glazed_terracotta",
"minecraft:blue_glazed_terracotta",
"minecraft:brown_glazed_terracotta",
"minecraft:green_glazed_terracotta",
"minecraft:black_glazed_terracotta",
"minecraft:red_glazed_terracotta",
{
"id": "#c:glazed_terracotta",
"required": false
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ private ConventionalBlockTags() {
public static final TagKey<Block> WOODEN_CHESTS = register("chests/wooden");
public static final TagKey<Block> GLASS_BLOCKS = register("glass_blocks");
public static final TagKey<Block> GLASS_PANES = register("glass_panes");
public static final TagKey<Block> GLAZED_TERRACOTTA = register("glazed_terracotta");
public static final TagKey<Block> CONCRETE = register("concrete");
public static final TagKey<Block> GLAZED_TERRACOTTAS = register("glazed_terracottas");
public static final TagKey<Block> CONCRETES = register("concretes");

// Related to budding mechanics
/**
Expand Down Expand Up @@ -157,6 +157,16 @@ private ConventionalBlockTags() {
*/
@Deprecated
public static final TagKey<Block> SHULKER_BOXES = register("shulker_boxes");
/**
* This tag was typoed. Please use {@link ConventionalBlockTags#GLAZED_TERRACOTTAS} tag instead.
*/
@Deprecated
public static final TagKey<Block> GLAZED_TERRACOTTA = register("glazed_terracotta");
/**
* This tag was typoed. Please use {@link ConventionalBlockTags#CONCRETES} tag instead.
*/
@Deprecated
public static final TagKey<Block> CONCRETE = register("concrete");

private static TagKey<Block> register(String tagId) {
return TagRegistration.BLOCK_TAG.registerC(tagId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ private ConventionalItemTags() {
* Block tag equivalent is {@link BlockTags#SHULKER_BOXES}.
*/
public static final TagKey<Item> SHULKER_BOXES = register("shulker_boxes");
public static final TagKey<Item> GLAZED_TERRACOTTA = register("glazed_terracotta");
public static final TagKey<Item> CONCRETE = register("concrete");
public static final TagKey<Item> GLAZED_TERRACOTTAS = register("glazed_terracottas");
public static final TagKey<Item> CONCRETES = register("concretes");
/**
* Block tag equivalent is {@link BlockTags#CONCRETE_POWDER}.
* Block tag equivalent is {@link BlockTags#CONCRETE_POWDERS}.
*/
public static final TagKey<Item> CONCRETE_POWDER = register("concrete_powder");
public static final TagKey<Item> CONCRETE_POWDERS = register("concrete_powders");

// Related to budding mechanics
public static final TagKey<Item> BUDDING_BLOCKS = register("budding_blocks");
Expand Down Expand Up @@ -376,6 +376,21 @@ private ConventionalItemTags() {
*/
@Deprecated
public static final TagKey<Item> MINING_TOOLS = register("tools/mining_tools");
/**
* This tag was typoed. Please use {@link ConventionalItemTags#GLAZED_TERRACOTTAS} tag instead.
*/
@Deprecated
public static final TagKey<Item> GLAZED_TERRACOTTA = register("glazed_terracotta");
/**
* This tag was typoed. Please use {@link ConventionalItemTags#CONCRETES} tag instead.
*/
@Deprecated
public static final TagKey<Item> CONCRETE = register("concrete");
/**
* This tag was typoed. Please use {@link ConventionalItemTags#CONCRETE_POWDERS} tag instead.
*/
@Deprecated
public static final TagKey<Item> CONCRETE_POWDER = register("concrete_powder");

private static TagKey<Item> register(String tagId) {
return TagRegistration.ITEM_TAG.registerC(tagId);
Expand Down

0 comments on commit 8a3b561

Please sign in to comment.