Skip to content

Commit 73519d3

Browse files
committed
Add various items to the new tool tags
1 parent 710f051 commit 73519d3

File tree

10 files changed

+74
-10
lines changed

10 files changed

+74
-10
lines changed

src/datagen/generated/mekanism/.cache/f4271571320fe007f5d8ba9eb4461ed6922f6a93

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datagen/generated/mekanism/data/c/tags/item/tools/mining_tool.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datagen/generated/mekanism/data/c/tags/item/tools/ranged_weapon.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datagen/generated/mekanismtools/.cache/74946afffd5717edd09cca189d3cabba428fcf6f

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datagen/generated/mekanismtools/data/c/tags/item/tools/melee_weapon.json

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datagen/generated/mekanismtools/data/c/tags/item/tools/mining_tool.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datagen/main/java/mekanism/common/tag/MekanismTagProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ private void addBoxBlacklist() {
251251
private void addTools() {
252252
addWrenches();
253253
addToTag(ItemTags.BREAKS_DECORATED_POTS, MekanismItems.ATOMIC_DISASSEMBLER, MekanismItems.MEKA_TOOL);
254+
addToTag(Tags.Items.MINING_TOOL_TOOLS , MekanismItems.ATOMIC_DISASSEMBLER, MekanismItems.MEKA_TOOL);
254255
addToTag(Tags.Items.TOOLS_BOW, MekanismItems.ELECTRIC_BOW);
256+
addToTag(Tags.Items.RANGED_WEAPON_TOOLS, MekanismItems.ELECTRIC_BOW);
255257
addToTag(ItemTags.BOW_ENCHANTABLE, MekanismItems.ELECTRIC_BOW);
256258
addToTag(ItemTags.DURABILITY_ENCHANTABLE, MekanismItems.HDPE_REINFORCED_ELYTRA);
257259
addToTag(ItemTags.EQUIPPABLE_ENCHANTABLE, MekanismItems.HDPE_REINFORCED_ELYTRA);

src/datagen/tools/java/mekanism/tools/common/ToolsTagProvider.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
import java.util.function.Predicate;
55
import mekanism.common.tag.BaseTagProvider;
66
import mekanism.common.tag.IntrinsicMekanismTagBuilder;
7+
import mekanism.tools.common.item.ItemMekanismAxe;
78
import mekanism.tools.common.item.ItemMekanismPaxel;
89
import mekanism.tools.common.item.ItemMekanismPickaxe;
10+
import mekanism.tools.common.item.ItemMekanismSword;
911
import mekanism.tools.common.registries.ToolsItems;
1012
import net.minecraft.core.Holder;
1113
import net.minecraft.core.HolderLookup;
@@ -60,6 +62,8 @@ protected void registerTags(HolderLookup.Provider registries) {
6062
getBlockBuilder(ToolsTags.Blocks.INCORRECT_FOR_REFINED_OBSIDIAN_TOOL).add(BlockTags.INCORRECT_FOR_NETHERITE_TOOL);
6163
getBlockBuilder(ToolsTags.Blocks.INCORRECT_FOR_STEEL_TOOL).add(BlockTags.INCORRECT_FOR_DIAMOND_TOOL);
6264
createTag(getItemBuilder(ItemTags.CLUSTER_MAX_HARVESTABLES), item -> item instanceof ItemMekanismPickaxe || item instanceof ItemMekanismPaxel);
65+
createTag(getItemBuilder(Tags.Items.MINING_TOOL_TOOLS), item -> item instanceof ItemMekanismPickaxe || item instanceof ItemMekanismPaxel);
66+
createTag(getItemBuilder(Tags.Items.MELEE_WEAPON_TOOLS), item -> item instanceof ItemMekanismSword || item instanceof ItemMekanismAxe || item instanceof ItemMekanismPaxel);
6367
}
6468

6569
private void addToolTags() {

src/main/java/mekanism/common/recipe/WrappedShapedRecipe.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
import net.minecraft.world.item.ItemStack;
66
import net.minecraft.world.item.crafting.CraftingBookCategory;
77
import net.minecraft.world.item.crafting.CraftingInput;
8-
import net.minecraft.world.item.crafting.CraftingRecipe;
98
import net.minecraft.world.item.crafting.ShapedRecipe;
109
import net.minecraft.world.item.crafting.ShapedRecipePattern;
1110
import net.minecraft.world.level.Level;
1211

1312
@NothingNullByDefault
14-
public abstract class WrappedShapedRecipe extends ShapedRecipe implements CraftingRecipe {
13+
public abstract class WrappedShapedRecipe extends ShapedRecipe {
1514

1615
protected WrappedShapedRecipe(String group, CraftingBookCategory category, ShapedRecipePattern pattern, ItemStack result, boolean showNotification) {
1716
super(group, category, pattern, result, showNotification);
@@ -26,8 +25,4 @@ public boolean matches(CraftingInput input, Level world) {
2625
// to ensure that we return the proper value for if there is a match that gives a proper output
2726
return super.matches(input, world) && !assemble(input, world.registryAccess()).isEmpty();
2827
}
29-
30-
public ShapedRecipePattern getPattern() {
31-
return this.pattern;
32-
}
3328
}

src/main/resources/META-INF/accesstransformer.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,4 @@ public net.minecraft.world.level.storage.loot.functions.CopyNbtFunction$Path
113113

114114
public net.minecraft.world.phys.AABB getDirection(Lnet/minecraft/world/phys/AABB;Lnet/minecraft/world/phys/Vec3;[DLnet/minecraft/core/Direction;DDD)Lnet/minecraft/core/Direction;
115115

116-
# todo remove if https://github.com/neoforged/NeoForge/pull/1270 gets merged
117-
public net.minecraft.world.item.crafting.ShapedRecipe pattern
118116
public net.minecraft.world.item.crafting.ShapedRecipe result

0 commit comments

Comments
 (0)