From f1b3fe2fce302fa10ac18458a244774569e6a2bf Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Thu, 13 Jun 2024 21:43:57 +0200 Subject: [PATCH] Remove unused tags --- .../blockentities/InfuserBlockEntity.java | 2 +- .../forcecraft/menu/slot/SlotForceTools.java | 24 ------------------- .../forcecraft/registry/ForceTags.java | 3 --- .../tags/items/valid_infuser_modifiers.json | 10 -------- .../tags/items/valid_infuser_tools.json | 13 ---------- .../tags/items/valid_treasure_tools.json | 6 ----- 6 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 src/main/java/com/mrbysco/forcecraft/menu/slot/SlotForceTools.java delete mode 100644 src/main/resources/data/forcecraft/tags/items/valid_infuser_modifiers.json delete mode 100644 src/main/resources/data/forcecraft/tags/items/valid_infuser_tools.json delete mode 100644 src/main/resources/data/forcecraft/tags/items/valid_treasure_tools.json diff --git a/src/main/java/com/mrbysco/forcecraft/blockentities/InfuserBlockEntity.java b/src/main/java/com/mrbysco/forcecraft/blockentities/InfuserBlockEntity.java index 90843928..9feea1a5 100644 --- a/src/main/java/com/mrbysco/forcecraft/blockentities/InfuserBlockEntity.java +++ b/src/main/java/com/mrbysco/forcecraft/blockentities/InfuserBlockEntity.java @@ -147,7 +147,7 @@ public boolean isItemValid(int slot, ItemStack stack) { // non ingredients into the circle } else if (slot == SLOT_TOOL) { // don't hardcode validation here, check recipe "center" tag or item - return matchesTool(stack);// stack.getItem().isIn(ForceTags.VALID_INFUSER_TOOLS); + return matchesTool(stack); } else if (slot == SLOT_BOOK) { return stack.getItem() == ForceRegistry.UPGRADE_TOME.get(); } else if (slot == SLOT_GEM) { diff --git a/src/main/java/com/mrbysco/forcecraft/menu/slot/SlotForceTools.java b/src/main/java/com/mrbysco/forcecraft/menu/slot/SlotForceTools.java deleted file mode 100644 index 28d6e1d0..00000000 --- a/src/main/java/com/mrbysco/forcecraft/menu/slot/SlotForceTools.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.mrbysco.forcecraft.menu.slot; - -import com.mrbysco.forcecraft.registry.ForceTags; -import net.minecraft.world.item.ItemStack; -import net.neoforged.neoforge.items.IItemHandler; -import net.neoforged.neoforge.items.SlotItemHandler; - -import javax.annotation.Nonnull; - -public class SlotForceTools extends SlotItemHandler { - public SlotForceTools(IItemHandler itemHandler, int index, int xPosition, int yPosition) { - super(itemHandler, index, xPosition, yPosition); - } - - @Override - public boolean mayPlace(ItemStack stack) { - return stack.is(ForceTags.VALID_INFUSER_TOOLS); - } - - @Override - public int getMaxStackSize(@Nonnull ItemStack stack) { - return 1; - } -} diff --git a/src/main/java/com/mrbysco/forcecraft/registry/ForceTags.java b/src/main/java/com/mrbysco/forcecraft/registry/ForceTags.java index 30f3f0e4..30636f4e 100644 --- a/src/main/java/com/mrbysco/forcecraft/registry/ForceTags.java +++ b/src/main/java/com/mrbysco/forcecraft/registry/ForceTags.java @@ -19,8 +19,6 @@ public class ForceTags { public static final TagKey MINEABLE_WITH_MITTS = forceBlockTag("mineable_with_mitts"); public static final TagKey FORCE_BRICK = forceBlockTag("force_brick"); - public static final TagKey VALID_INFUSER_MODIFIERS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_infuser_modifiers")); - public static final TagKey VALID_INFUSER_TOOLS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_infuser_tools")); public static final TagKey VALID_INFUSER_CHARGE = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_infuser_charge")); public static final TagKey TOOLS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "tools")); public static final TagKey FORCE_FUELS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "force_fuel")); @@ -33,7 +31,6 @@ public class ForceTags { public static final TagKey VALID_STURDY_TOOLS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_sturdy_tools")); public static final TagKey VALID_ENDER_TOOLS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_ender_tools")); public static final TagKey VALID_LIGHT_TOOLS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_light_tools")); - public static final TagKey VALID_TREASURE_TOOLS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_treasure_tools")); public static final TagKey VALID_BLEEDING_TOOLS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_bleeding_tools")); public static final TagKey VALID_SILKY_TOOLS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_silky_tools")); public static final TagKey VALID_CAMO_TOOLS = ItemTags.create(new ResourceLocation(Reference.MOD_ID, "valid_camo_tools")); diff --git a/src/main/resources/data/forcecraft/tags/items/valid_infuser_modifiers.json b/src/main/resources/data/forcecraft/tags/items/valid_infuser_modifiers.json deleted file mode 100644 index d2eccfec..00000000 --- a/src/main/resources/data/forcecraft/tags/items/valid_infuser_modifiers.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "__comment": "This tag doesnt make too much sense, any item thats an input of at least one recipe is a valid infuser modifier. makes sense to delete this i think", - "values": [ - "forcecraft:force_nugget", - "forcecraft:force_log", - "minecraft:sugar", - "minecraft:flint", - "minecraft:experience_bottle" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/forcecraft/tags/items/valid_infuser_tools.json b/src/main/resources/data/forcecraft/tags/items/valid_infuser_tools.json deleted file mode 100644 index 1a43ae9b..00000000 --- a/src/main/resources/data/forcecraft/tags/items/valid_infuser_tools.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "values": [ - "forcecraft:force_pickaxe", - "forcecraft:force_axe", - "forcecraft:force_shovel", - "forcecraft:force_sword", - "forcecraft:force_rod", - "forcecraft:force_shears", - "forcecraft:force_torch", - "forcecraft:force_pack", - "#forcecraft:force_armor" - ] -} diff --git a/src/main/resources/data/forcecraft/tags/items/valid_treasure_tools.json b/src/main/resources/data/forcecraft/tags/items/valid_treasure_tools.json deleted file mode 100644 index 2e0bc25a..00000000 --- a/src/main/resources/data/forcecraft/tags/items/valid_treasure_tools.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "values": [ - "forcecraft:force_sword", - "forcecraft:force_axe" - ] -}