diff --git a/src/main/java/io/github/pylonmc/pylon/PylonItems.java b/src/main/java/io/github/pylonmc/pylon/PylonItems.java index d7b996e0e..d952107dd 100644 --- a/src/main/java/io/github/pylonmc/pylon/PylonItems.java +++ b/src/main/java/io/github/pylonmc/pylon/PylonItems.java @@ -989,7 +989,7 @@ private PylonItems() { .set(DataComponentTypes.ITEM_MODEL, Material.GOLDEN_AXE.getKey()) .build(); static { - RebarItem.register(RebarItem.class, BRONZE_AXE); + RebarItem.register(BronzeTool.class, BRONZE_AXE); PylonPages.TOOLS.addItem(BRONZE_AXE); } @@ -997,7 +997,7 @@ private PylonItems() { .set(DataComponentTypes.ITEM_MODEL, Material.GOLDEN_PICKAXE.getKey()) .build(); static { - RebarItem.register(RebarItem.class, BRONZE_PICKAXE); + RebarItem.register(BronzeTool.class, BRONZE_PICKAXE); PylonPages.TOOLS.addItem(BRONZE_PICKAXE); } @@ -1005,7 +1005,7 @@ private PylonItems() { .set(DataComponentTypes.ITEM_MODEL, Material.GOLDEN_SHOVEL.getKey()) .build(); static { - RebarItem.register(RebarItem.class, BRONZE_SHOVEL); + RebarItem.register(BronzeTool.class, BRONZE_SHOVEL); PylonPages.TOOLS.addItem(BRONZE_SHOVEL); } @@ -1013,7 +1013,7 @@ private PylonItems() { .set(DataComponentTypes.ITEM_MODEL, Material.GOLDEN_HOE.getKey()) .build(); static { - RebarItem.register(RebarItem.class, BRONZE_HOE); + RebarItem.register(BronzeTool.class, BRONZE_HOE); PylonPages.TOOLS.addItem(BRONZE_HOE); } @@ -1021,7 +1021,7 @@ private PylonItems() { .set(DataComponentTypes.ITEM_MODEL, Material.NETHERITE_AXE.getKey()) .build(); static { - RebarItem.register(RebarItem.class, STEEL_AXE); + RebarItem.register(SteelTool.class, STEEL_AXE); PylonPages.TOOLS.addItem(STEEL_AXE); } @@ -1029,7 +1029,7 @@ private PylonItems() { .set(DataComponentTypes.ITEM_MODEL, Material.NETHERITE_PICKAXE.getKey()) .build(); static { - RebarItem.register(RebarItem.class, STEEL_PICKAXE); + RebarItem.register(SteelTool.class, STEEL_PICKAXE); PylonPages.TOOLS.addItem(STEEL_PICKAXE); } @@ -1037,7 +1037,7 @@ private PylonItems() { .set(DataComponentTypes.ITEM_MODEL, Material.NETHERITE_SHOVEL.getKey()) .build(); static { - RebarItem.register(RebarItem.class, STEEL_SHOVEL); + RebarItem.register(SteelTool.class, STEEL_SHOVEL); PylonPages.TOOLS.addItem(STEEL_SHOVEL); } @@ -1045,7 +1045,7 @@ private PylonItems() { .set(DataComponentTypes.ITEM_MODEL, Material.NETHERITE_HOE.getKey()) .build(); static { - RebarItem.register(RebarItem.class, STEEL_HOE); + RebarItem.register(SteelTool.class, STEEL_HOE); PylonPages.TOOLS.addItem(STEEL_HOE); } @@ -1184,7 +1184,7 @@ private PylonItems() { .set(DataComponentTypes.MAX_DAMAGE, Settings.get(PylonKeys.PALLADIUM_AXE).getOrThrow("durability", ConfigAdapter.INTEGER)) .build(); static { - RebarItem.register(RebarItem.class, PALLADIUM_AXE); + RebarItem.register(PalladiumTool.class, PALLADIUM_AXE); PylonPages.TOOLS.addItem(PALLADIUM_AXE); } @@ -1195,7 +1195,7 @@ private PylonItems() { .set(DataComponentTypes.MAX_DAMAGE, Settings.get(PylonKeys.PALLADIUM_PICKAXE).getOrThrow("durability", ConfigAdapter.INTEGER)) .build(); static { - RebarItem.register(RebarItem.class, PALLADIUM_PICKAXE); + RebarItem.register(PalladiumTool.class, PALLADIUM_PICKAXE); PylonPages.TOOLS.addItem(PALLADIUM_PICKAXE); } @@ -1207,7 +1207,7 @@ private PylonItems() { .set(DataComponentTypes.MAX_DAMAGE, Settings.get(PylonKeys.PALLADIUM_SHOVEL).getOrThrow("durability", ConfigAdapter.INTEGER)) .build(); static { - RebarItem.register(RebarItem.class, PALLADIUM_SHOVEL); + RebarItem.register(PalladiumTool.class, PALLADIUM_SHOVEL); PylonPages.TOOLS.addItem(PALLADIUM_SHOVEL); } @@ -1218,7 +1218,7 @@ private PylonItems() { .set(DataComponentTypes.MAX_DAMAGE, Settings.get(PylonKeys.PALLADIUM_HOE).getOrThrow("durability", ConfigAdapter.INTEGER)) .build(); static { - RebarItem.register(RebarItem.class, PALLADIUM_HOE); + RebarItem.register(PalladiumTool.class, PALLADIUM_HOE); PylonPages.TOOLS.addItem(PALLADIUM_HOE); } diff --git a/src/main/java/io/github/pylonmc/pylon/content/armor/BronzeArmor.java b/src/main/java/io/github/pylonmc/pylon/content/armor/BronzeArmor.java index c191844ee..7aac95ee8 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/armor/BronzeArmor.java +++ b/src/main/java/io/github/pylonmc/pylon/content/armor/BronzeArmor.java @@ -1,17 +1,27 @@ package io.github.pylonmc.pylon.content.armor; +import io.github.pylonmc.pylon.PylonKeys; import io.github.pylonmc.pylon.util.PylonUtils; import io.github.pylonmc.rebar.item.RebarItem; import io.github.pylonmc.rebar.item.base.RebarArmor; +import io.github.pylonmc.rebar.item.base.RebarRepairable; import net.kyori.adventure.key.Key; +import org.bukkit.NamespacedKey; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; -public class BronzeArmor extends RebarItem implements RebarArmor { +import java.util.List; + +public class BronzeArmor extends RebarItem implements RebarArmor, RebarRepairable { public BronzeArmor(@NotNull ItemStack stack) { super(stack); } + @Override + public @NotNull List getRepairItems() { + return List.of(PylonKeys.BRONZE_INGOT); + } + @Override public @NotNull Key getEquipmentType() { return PylonUtils.pylonKey("bronze"); diff --git a/src/main/java/io/github/pylonmc/pylon/content/armor/PalladiumArmor.java b/src/main/java/io/github/pylonmc/pylon/content/armor/PalladiumArmor.java index 356bb7b07..0dc6a7545 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/armor/PalladiumArmor.java +++ b/src/main/java/io/github/pylonmc/pylon/content/armor/PalladiumArmor.java @@ -1,17 +1,27 @@ package io.github.pylonmc.pylon.content.armor; +import io.github.pylonmc.pylon.PylonKeys; import io.github.pylonmc.pylon.util.PylonUtils; import io.github.pylonmc.rebar.item.RebarItem; import io.github.pylonmc.rebar.item.base.RebarArmor; +import io.github.pylonmc.rebar.item.base.RebarRepairable; import net.kyori.adventure.key.Key; +import org.bukkit.NamespacedKey; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; -public class PalladiumArmor extends RebarItem implements RebarArmor { +import java.util.List; + +public class PalladiumArmor extends RebarItem implements RebarArmor, RebarRepairable { public PalladiumArmor(@NotNull ItemStack stack) { super(stack); } + @Override + public @NotNull List getRepairItems() { + return List.of(PylonKeys.PALLADIUM_INGOT); + } + @Override public @NotNull Key getEquipmentType() { return PylonUtils.pylonKey("palladium"); diff --git a/src/main/java/io/github/pylonmc/pylon/content/armor/SteelArmor.java b/src/main/java/io/github/pylonmc/pylon/content/armor/SteelArmor.java index 105b11091..c273f4c83 100644 --- a/src/main/java/io/github/pylonmc/pylon/content/armor/SteelArmor.java +++ b/src/main/java/io/github/pylonmc/pylon/content/armor/SteelArmor.java @@ -1,17 +1,27 @@ package io.github.pylonmc.pylon.content.armor; +import io.github.pylonmc.pylon.PylonKeys; import io.github.pylonmc.pylon.util.PylonUtils; import io.github.pylonmc.rebar.item.RebarItem; import io.github.pylonmc.rebar.item.base.RebarArmor; +import io.github.pylonmc.rebar.item.base.RebarRepairable; import net.kyori.adventure.key.Key; +import org.bukkit.NamespacedKey; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; -public class SteelArmor extends RebarItem implements RebarArmor { +import java.util.List; + +public class SteelArmor extends RebarItem implements RebarArmor, RebarRepairable { public SteelArmor(@NotNull ItemStack stack) { super(stack); } + @Override + public @NotNull List getRepairItems() { + return List.of(PylonKeys.STEEL_INGOT); + } + @Override public @NotNull Key getEquipmentType() { return PylonUtils.pylonKey("steel"); diff --git a/src/main/java/io/github/pylonmc/pylon/content/tools/BronzeTool.java b/src/main/java/io/github/pylonmc/pylon/content/tools/BronzeTool.java new file mode 100644 index 000000000..3a2651822 --- /dev/null +++ b/src/main/java/io/github/pylonmc/pylon/content/tools/BronzeTool.java @@ -0,0 +1,21 @@ +package io.github.pylonmc.pylon.content.tools; + +import io.github.pylonmc.pylon.PylonKeys; +import io.github.pylonmc.rebar.item.RebarItem; +import io.github.pylonmc.rebar.item.base.RebarRepairable; +import org.bukkit.NamespacedKey; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +public class BronzeTool extends RebarItem implements RebarRepairable { + public BronzeTool(@NotNull ItemStack stack) { + super(stack); + } + + @Override + public @NotNull List getRepairItems() { + return List.of(PylonKeys.BRONZE_INGOT); + } +} diff --git a/src/main/java/io/github/pylonmc/pylon/content/tools/PalladiumTool.java b/src/main/java/io/github/pylonmc/pylon/content/tools/PalladiumTool.java new file mode 100644 index 000000000..2b536b0d3 --- /dev/null +++ b/src/main/java/io/github/pylonmc/pylon/content/tools/PalladiumTool.java @@ -0,0 +1,21 @@ +package io.github.pylonmc.pylon.content.tools; + +import io.github.pylonmc.pylon.PylonKeys; +import io.github.pylonmc.rebar.item.RebarItem; +import io.github.pylonmc.rebar.item.base.RebarRepairable; +import org.bukkit.NamespacedKey; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +public class PalladiumTool extends RebarItem implements RebarRepairable { + public PalladiumTool(@NotNull ItemStack stack) { + super(stack); + } + + @Override + public @NotNull List getRepairItems() { + return List.of(PylonKeys.PALLADIUM_INGOT); + } +} diff --git a/src/main/java/io/github/pylonmc/pylon/content/tools/SteelTool.java b/src/main/java/io/github/pylonmc/pylon/content/tools/SteelTool.java new file mode 100644 index 000000000..6b5aa9285 --- /dev/null +++ b/src/main/java/io/github/pylonmc/pylon/content/tools/SteelTool.java @@ -0,0 +1,21 @@ +package io.github.pylonmc.pylon.content.tools; + +import io.github.pylonmc.pylon.PylonKeys; +import io.github.pylonmc.rebar.item.RebarItem; +import io.github.pylonmc.rebar.item.base.RebarRepairable; +import org.bukkit.NamespacedKey; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +public class SteelTool extends RebarItem implements RebarRepairable { + public SteelTool(@NotNull ItemStack stack) { + super(stack); + } + + @Override + public @NotNull List getRepairItems() { + return List.of(PylonKeys.STEEL_INGOT); + } +}