diff --git a/src/generated/resources/assets/c/lang/en_us.json b/src/generated/resources/assets/c/lang/en_us.json index 2ebb88ffd7..c05a9fc354 100644 --- a/src/generated/resources/assets/c/lang/en_us.json +++ b/src/generated/resources/assets/c/lang/en_us.json @@ -378,6 +378,7 @@ "tag.item.c.tools.shear": "Shears", "tag.item.c.tools.shield": "Shields", "tag.item.c.tools.spear": "Spears", + "tag.item.c.tools.wrench": "Wrenches", "tag.item.c.villager_job_sites": "Villager Job Sites", "tag.item.neoforge.enchanting_fuels": "Enchanting Fuels", "tag.worldgen.biome.c.hidden_from_locator_selection": "Hidden From Locator's Selection", diff --git a/src/generated/resources/data/c/tags/item/tools.json b/src/generated/resources/data/c/tags/item/tools.json index 473d51f1f2..6fd1f02c3a 100644 --- a/src/generated/resources/data/c/tags/item/tools.json +++ b/src/generated/resources/data/c/tags/item/tools.json @@ -14,6 +14,7 @@ "#c:tools/shield", "#c:tools/spear", "#c:tools/mace", + "#c:tools/wrench", "#c:tools/mining_tool", "#c:tools/melee_weapon", "#c:tools/ranged_weapon", diff --git a/src/generated/resources/data/c/tags/item/tools/wrench.json b/src/generated/resources/data/c/tags/item/tools/wrench.json new file mode 100644 index 0000000000..f72d209df7 --- /dev/null +++ b/src/generated/resources/data/c/tags/item/tools/wrench.json @@ -0,0 +1,3 @@ +{ + "values": [] +} \ No newline at end of file diff --git a/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java b/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java index 016b47da46..27373941db 100644 --- a/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java +++ b/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java @@ -374,10 +374,11 @@ public enum LogWarningMode { createForgeMapEntry(Registries.ITEM, "armors/chestplates", ItemTags.CHEST_ARMOR), createForgeMapEntry(Registries.ITEM, "armors/leggings", ItemTags.LEG_ARMOR), createForgeMapEntry(Registries.ITEM, "armors/boots", ItemTags.FOOT_ARMOR), - createForgeMapEntry(Registries.ITEM, "wrench", "tools/wrenches"), - createForgeMapEntry(Registries.ITEM, "wrenches", "tools/wrenches"), - createForgeMapEntry(Registries.ITEM, "tools/wrench", "tools/wrenches"), - createForgeMapEntry(Registries.ITEM, "tools/wrenches", "tools/wrenches"), + createForgeMapEntry(Registries.ITEM, "wrench", Tags.Items.TOOLS_WRENCH), + createForgeMapEntry(Registries.ITEM, "wrenches", Tags.Items.TOOLS_WRENCH), + createForgeMapEntry(Registries.ITEM, "tools/wrench", Tags.Items.TOOLS_WRENCH), + createForgeMapEntry(Registries.ITEM, "tools/wrenches", Tags.Items.TOOLS_WRENCH), + createMapEntry(Registries.ITEM, "c", "tools/wrenches", Tags.Items.TOOLS_WRENCH), createForgeMapEntry(Registries.ITEM, "food", Tags.Items.FOODS), createForgeMapEntry(Registries.ITEM, "foods", Tags.Items.FOODS), createForgeMapEntry(Registries.ITEM, "fruit", Tags.Items.FOODS_FRUIT), diff --git a/src/main/java/net/neoforged/neoforge/common/Tags.java b/src/main/java/net/neoforged/neoforge/common/Tags.java index b73ea90053..70fc3d4a7e 100644 --- a/src/main/java/net/neoforged/neoforge/common/Tags.java +++ b/src/main/java/net/neoforged/neoforge/common/Tags.java @@ -803,6 +803,14 @@ public static class Items { * @see ItemAbilities */ public static final TagKey TOOLS_MACE = tag("tools/mace"); + /** + * A tag containing all existing wrenches. Do not use this tag for determining a tool's behavior. + * Please use {@link ItemAbilities} instead for what action a tool can do. + * + * @see ItemAbility + * @see ItemAbilities + */ + public static final TagKey TOOLS_WRENCH = tag("tools/wrench"); /** * 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. diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java index f58c4ce504..5fb31b15e8 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java @@ -275,6 +275,7 @@ public void addTags(HolderLookup.Provider lookupProvider) { tag(Tags.Items.TOOLS_SHEAR).add(Items.SHEARS); tag(Tags.Items.TOOLS_SPEAR).add(Items.TRIDENT); tag(Tags.Items.TOOLS_IGNITER).add(Items.FLINT_AND_STEEL); + tag(Tags.Items.TOOLS_WRENCH); tag(Tags.Items.MINING_TOOL_TOOLS).add(Items.WOODEN_PICKAXE, Items.STONE_PICKAXE, Items.GOLDEN_PICKAXE, Items.IRON_PICKAXE, Items.DIAMOND_PICKAXE, Items.NETHERITE_PICKAXE); tag(Tags.Items.MELEE_WEAPON_TOOLS).add( Items.MACE, Items.TRIDENT, @@ -283,7 +284,9 @@ public void addTags(HolderLookup.Provider lookupProvider) { tag(Tags.Items.RANGED_WEAPON_TOOLS).add(Items.BOW, Items.CROSSBOW, Items.TRIDENT); tag(Tags.Items.TOOLS) .addTags(ItemTags.AXES, ItemTags.HOES, ItemTags.PICKAXES, ItemTags.SHOVELS, ItemTags.SWORDS) - .addTags(Tags.Items.TOOLS_BOW, Tags.Items.TOOLS_BRUSH, Tags.Items.TOOLS_CROSSBOW, Tags.Items.TOOLS_FISHING_ROD, Tags.Items.TOOLS_IGNITER, Tags.Items.TOOLS_SHEAR, Tags.Items.TOOLS_SHIELD, Tags.Items.TOOLS_SPEAR, Tags.Items.TOOLS_MACE, + .addTags(Tags.Items.TOOLS_BOW, Tags.Items.TOOLS_BRUSH, Tags.Items.TOOLS_CROSSBOW, Tags.Items.TOOLS_FISHING_ROD, + Tags.Items.TOOLS_IGNITER, Tags.Items.TOOLS_SHEAR, Tags.Items.TOOLS_SHIELD, Tags.Items.TOOLS_SPEAR, + Tags.Items.TOOLS_MACE, Tags.Items.TOOLS_WRENCH, Tags.Items.MINING_TOOL_TOOLS, Tags.Items.MELEE_WEAPON_TOOLS, Tags.Items.RANGED_WEAPON_TOOLS); tag(Tags.Items.ARMORS).addTags(ItemTags.HEAD_ARMOR, ItemTags.CHEST_ARMOR, ItemTags.LEG_ARMOR, ItemTags.FOOT_ARMOR); tag(Tags.Items.ENCHANTABLES).addTags(ItemTags.ARMOR_ENCHANTABLE, ItemTags.EQUIPPABLE_ENCHANTABLE, ItemTags.WEAPON_ENCHANTABLE, ItemTags.SWORD_ENCHANTABLE, ItemTags.MINING_ENCHANTABLE, ItemTags.MINING_LOOT_ENCHANTABLE, ItemTags.FISHING_ENCHANTABLE, ItemTags.TRIDENT_ENCHANTABLE, ItemTags.BOW_ENCHANTABLE, ItemTags.CROSSBOW_ENCHANTABLE, ItemTags.MACE_ENCHANTABLE, ItemTags.FIRE_ASPECT_ENCHANTABLE, ItemTags.DURABILITY_ENCHANTABLE, ItemTags.VANISHING_ENCHANTABLE); diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java index 0b59636061..c06418b01a 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java @@ -349,6 +349,7 @@ protected void addTranslations() { add(Tags.Items.TOOLS_MACE, "Maces"); add(Tags.Items.TOOLS_SPEAR, "Spears"); add(Tags.Items.TOOLS_IGNITER, "Igniters"); + add(Tags.Items.TOOLS_WRENCH, "Wrenches"); add(Tags.Items.MELEE_WEAPON_TOOLS, "Melee Weapons"); add(Tags.Items.RANGED_WEAPON_TOOLS, "Ranged Weapons"); add(Tags.Items.MINING_TOOL_TOOLS, "Mining Tools");