Skip to content

Commit

Permalink
Add tagkey for c:tools/wrench (#4386)
Browse files Browse the repository at this point in the history
Addresses #4376
  • Loading branch information
TelepathicGrunt authored Jan 21, 2025
1 parent 9a56a7c commit 53ee34a
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,13 @@ boolean isVerbose() {
createMapEntry(RegistryKeys.ITEM, "hoes", ItemTags.HOES),
createMapEntry(RegistryKeys.ITEM, "shovels", ItemTags.SHOVELS),
createMapEntry(RegistryKeys.ITEM, "swords", ItemTags.SWORDS),
createMapEntry(RegistryKeys.ITEM, "wrenches", "tools/wrenches"),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "axes"), ItemTags.AXES),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "pickaxes"), ItemTags.PICKAXES),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "hoes"), ItemTags.HOES),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "shovels"), ItemTags.SHOVELS),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "swords"), ItemTags.SWORDS),
createMapEntry(RegistryKeys.ITEM, "wrenches", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.WRENCH_TOOLS),
createMapEntry(RegistryKeys.ITEM, "tools/wrenches", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.WRENCH_TOOLS),
createMapEntry(RegistryKeys.ITEM, "barrel", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.BARRELS),
createMapEntry(RegistryKeys.ITEM, "chest", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.CHESTS),
createMapEntry(RegistryKeys.ITEM, "glass", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.GLASS_BLOCKS),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public void generateTranslations(RegistryWrapper.WrapperLookup registryLookup, T
translationBuilder.add(ConventionalItemTags.BRUSH_TOOLS, "Brushes");
translationBuilder.add(ConventionalItemTags.IGNITER_TOOLS, "Igniters");
translationBuilder.add(ConventionalItemTags.MACE_TOOLS, "Maces");
translationBuilder.add(ConventionalItemTags.WRENCH_TOOLS, "Wrenches");
translationBuilder.add(ConventionalItemTags.MELEE_WEAPON_TOOLS, "Melee Weapons");
translationBuilder.add(ConventionalItemTags.RANGED_WEAPON_TOOLS, "Ranged Weapons");
translationBuilder.add(ConventionalItemTags.MINING_TOOL_TOOLS, "Mining Tools");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@ private void generateToolTags() {
.addOptionalTag(ConventionalItemTags.SHEAR_TOOLS)
.addOptionalTag(ConventionalItemTags.SHIELD_TOOLS)
.addOptionalTag(ConventionalItemTags.SPEAR_TOOLS)
.addOptionalTag(ConventionalItemTags.MACE_TOOLS)
.addOptionalTag(ConventionalItemTags.WRENCH_TOOLS)
.addOptionalTag(ConventionalItemTags.MINING_TOOL_TOOLS)
.addOptionalTag(ConventionalItemTags.MELEE_WEAPON_TOOLS)
.addOptionalTag(ConventionalItemTags.RANGED_WEAPON_TOOLS);
Expand Down Expand Up @@ -621,6 +623,7 @@ private void generateToolTags() {
.add(Items.FLINT_AND_STEEL);
getOrCreateTagBuilder(ConventionalItemTags.MACE_TOOLS)
.add(Items.MACE);
getOrCreateTagBuilder(ConventionalItemTags.WRENCH_TOOLS);

getOrCreateTagBuilder(ConventionalItemTags.MINING_TOOL_TOOLS)
.add(Items.WOODEN_PICKAXE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@
"tag.item.c.tools.shields": "Shields",
"tag.item.c.tools.spear": "Spears",
"tag.item.c.tools.spears": "Spears",
"tag.item.c.tools.wrench": "Wrenches",
"tag.item.c.villager_job_sites": "Villager Job Sites",
"tag.worldgen.biome.c.hidden_from_locator_selection": "Hidden From Locator Selection",
"tag.worldgen.biome.c.is_aquatic": "Aquatic",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@
"id": "#c:tools/spear",
"required": false
},
{
"id": "#c:tools/mace",
"required": false
},
{
"id": "#c:tools/wrench",
"required": false
},
{
"id": "#c:tools/mining_tool",
"required": false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"values": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ private ConventionalItemTags() {
*/
public static final TagKey<Item> IGNITER_TOOLS = register("tools/igniter");
public static final TagKey<Item> MACE_TOOLS = register("tools/mace");
public static final TagKey<Item> WRENCH_TOOLS = register("tools/wrench");

// Action-based tool tags
/**
Expand Down

0 comments on commit 53ee34a

Please sign in to comment.