mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-26 18:47:57 +01:00
Implement new repairable stuff for custom tools/armor.
This commit is contained in:
parent
c5183309ae
commit
0294cf8c4a
@ -12,6 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.datatypes.mods.CustomItem;
|
import com.gmail.nossr50.datatypes.mods.CustomItem;
|
||||||
import com.gmail.nossr50.skills.repair.Repairable;
|
import com.gmail.nossr50.skills.repair.Repairable;
|
||||||
|
import com.gmail.nossr50.skills.repair.RepairableFactory;
|
||||||
|
|
||||||
public class CustomArmorConfig extends ModConfigLoader{
|
public class CustomArmorConfig extends ModConfigLoader{
|
||||||
private static CustomArmorConfig instance;
|
private static CustomArmorConfig instance;
|
||||||
@ -91,6 +92,7 @@ public class CustomArmorConfig extends ModConfigLoader{
|
|||||||
|
|
||||||
if (repairable) {
|
if (repairable) {
|
||||||
ItemStack repairMaterial = new ItemStack(repairID, 1, (short) 0, repairData);
|
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);
|
armor = new CustomItem(durability, repairMaterial, repairQuantity, repairable, id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -12,6 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.datatypes.mods.CustomTool;
|
import com.gmail.nossr50.datatypes.mods.CustomTool;
|
||||||
import com.gmail.nossr50.skills.repair.Repairable;
|
import com.gmail.nossr50.skills.repair.Repairable;
|
||||||
|
import com.gmail.nossr50.skills.repair.RepairableFactory;
|
||||||
|
|
||||||
public class CustomToolsConfig extends ModConfigLoader {
|
public class CustomToolsConfig extends ModConfigLoader {
|
||||||
private static CustomToolsConfig instance;
|
private static CustomToolsConfig instance;
|
||||||
@ -98,6 +99,7 @@ public class CustomToolsConfig extends ModConfigLoader {
|
|||||||
|
|
||||||
if (repairable) {
|
if (repairable) {
|
||||||
ItemStack repairMaterial = new ItemStack(repairID, 1, (short) 0, repairData);
|
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);
|
tool = new CustomTool(durability, repairMaterial, repairQuantity, repairable, tier, abilityEnabled, multiplier, id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user