mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +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 int id;
|
||||||
private final String translationKey;
|
private final String translationKey;
|
||||||
private final int maxStackSize;
|
private final int maxStackSize;
|
||||||
|
private final int maxDamage;
|
||||||
private final boolean isFood;
|
private final boolean isFood;
|
||||||
private final Supplier<Block> blockSupplier;
|
private final Supplier<Block> blockSupplier;
|
||||||
private final EquipmentSlot equipmentSlot;
|
private final EquipmentSlot equipmentSlot;
|
||||||
@ -178,6 +179,7 @@ public class Registry {
|
|||||||
this.id = getInt("id");
|
this.id = getInt("id");
|
||||||
this.translationKey = getString("translationKey");
|
this.translationKey = getString("translationKey");
|
||||||
this.maxStackSize = getInt("maxStackSize", 64);
|
this.maxStackSize = getInt("maxStackSize", 64);
|
||||||
|
this.maxDamage = getInt("maxDamage", 0);
|
||||||
this.isFood = getBoolean("edible", false);
|
this.isFood = getBoolean("edible", false);
|
||||||
{
|
{
|
||||||
final String blockNamespace = getString("correspondingBlock", null);
|
final String blockNamespace = getString("correspondingBlock", null);
|
||||||
@ -227,6 +229,10 @@ public class Registry {
|
|||||||
return maxStackSize;
|
return maxStackSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int maxDamage() {
|
||||||
|
return maxDamage;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isFood() {
|
public boolean isFood() {
|
||||||
return isFood;
|
return isFood;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user