gave vanilla tools a pickaxe power value:

Wood: 5
Stone: 10
Gold: 15
Iron: 20
Diamond: 25
Netherite: 30
This commit is contained in:
ASangarin 2020-07-02 19:18:27 +02:00
parent 71113603ea
commit ec14e3f378

View File

@ -158,6 +158,26 @@ public class CustomBlockListener implements Listener {
NBTItem nbt = NBTItem.get(item); NBTItem nbt = NBTItem.get(item);
if (nbt.hasType()) if (nbt.hasType())
return nbt.getInteger("MMOITEMS_PICKAXE_POWER"); return nbt.getInteger("MMOITEMS_PICKAXE_POWER");
else {
switch(item.getType().name()) {
case "WOODEN_PICKAXE":
case "WOOD_PICKAXE":
return 5;
case "STONE_PICKAXE":
return 10;
case "GOLDEN_PICKAXE":
case "GOLD_PICKAXE":
return 15;
case "IRON_PICKAXE":
return 20;
case "DIAMOND_PICKAXE":
return 25;
case "NETHERITE_PICKAXE":
return 30;
default:
return 0;
}
}
} }
return 0; return 0;