Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tagkey for c:tools/wrench #1864

Open
wants to merge 1 commit into
base: 1.21.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/generated/resources/assets/c/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/generated/resources/data/c/tags/item/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/generated/resources/data/c/tags/item/tools/wrench.json
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 @@ -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),
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/net/neoforged/neoforge/common/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,14 @@ public static class Items {
* @see ItemAbilities
*/
public static final TagKey<Item> 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<Item> 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading