Add maxDamage for Material registry

This commit is contained in:
TheMode 2021-07-28 17:00:16 +02:00
parent 6a86e92999
commit 5ff7667691

View File

@ -168,6 +168,7 @@ public class Registry {
private final int id;
private final String translationKey;
private final int maxStackSize;
private final int maxDamage;
private final boolean isFood;
private final Supplier<Block> blockSupplier;
private final EquipmentSlot equipmentSlot;
@ -178,6 +179,7 @@ public class Registry {
this.id = getInt("id");
this.translationKey = getString("translationKey");
this.maxStackSize = getInt("maxStackSize", 64);
this.maxDamage = getInt("maxDamage", 0);
this.isFood = getBoolean("edible", false);
{
final String blockNamespace = getString("correspondingBlock", null);
@ -227,6 +229,10 @@ public class Registry {
return maxStackSize;
}
public int maxDamage() {
return maxDamage;
}
public boolean isFood() {
return isFood;
}