From 0294cf8c4accaa660799e59a02745cadd351b9aa Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 22 May 2012 08:21:05 -0400 Subject: [PATCH] Implement new repairable stuff for custom tools/armor. --- .../java/com/gmail/nossr50/config/mods/CustomArmorConfig.java | 2 ++ .../java/com/gmail/nossr50/config/mods/CustomToolsConfig.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java index 5b3948354..15afa4b3c 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java @@ -12,6 +12,7 @@ import org.bukkit.inventory.ItemStack; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.datatypes.mods.CustomItem; import com.gmail.nossr50.skills.repair.Repairable; +import com.gmail.nossr50.skills.repair.RepairableFactory; public class CustomArmorConfig extends ModConfigLoader{ private static CustomArmorConfig instance; @@ -91,6 +92,7 @@ public class CustomArmorConfig extends ModConfigLoader{ if (repairable) { ItemStack repairMaterial = new ItemStack(repairID, 1, (short) 0, repairData); + repairables.add(RepairableFactory.getRepairable(id, repairID, repairData, repairQuantity, durability)); armor = new CustomItem(durability, repairMaterial, repairQuantity, repairable, id); } else { diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java index dbde446fb..d50c8c7d7 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java @@ -12,6 +12,7 @@ import org.bukkit.inventory.ItemStack; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.datatypes.mods.CustomTool; import com.gmail.nossr50.skills.repair.Repairable; +import com.gmail.nossr50.skills.repair.RepairableFactory; public class CustomToolsConfig extends ModConfigLoader { private static CustomToolsConfig instance; @@ -98,6 +99,7 @@ public class CustomToolsConfig extends ModConfigLoader { if (repairable) { ItemStack repairMaterial = new ItemStack(repairID, 1, (short) 0, repairData); + repairables.add(RepairableFactory.getRepairable(id, repairID, repairData, repairQuantity, durability)); tool = new CustomTool(durability, repairMaterial, repairQuantity, repairable, tier, abilityEnabled, multiplier, id); } else {