mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Add maxDamage
for Material registry
This commit is contained in:
parent
6a86e92999
commit
5ff7667691
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user