mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-29 06:57:28 +02:00
Add translation keys
This commit is contained in:
parent
82e5873b4f
commit
00b991e970
@ -48,6 +48,7 @@ public class Registry {
|
|||||||
private final NamespaceID namespace;
|
private final NamespaceID namespace;
|
||||||
private final int id;
|
private final int id;
|
||||||
private final int stateId;
|
private final int stateId;
|
||||||
|
private final String translationKey;
|
||||||
private final double hardness;
|
private final double hardness;
|
||||||
private final double explosionResistance;
|
private final double explosionResistance;
|
||||||
private final double friction;
|
private final double friction;
|
||||||
@ -64,6 +65,7 @@ public class Registry {
|
|||||||
this.namespace = NamespaceID.from(namespace);
|
this.namespace = NamespaceID.from(namespace);
|
||||||
this.id = getInt("id");
|
this.id = getInt("id");
|
||||||
this.stateId = getInt("stateId");
|
this.stateId = getInt("stateId");
|
||||||
|
this.translationKey = getString("translationKey");
|
||||||
this.hardness = getDouble("hardness");
|
this.hardness = getDouble("hardness");
|
||||||
this.explosionResistance = getDouble("explosionResistance");
|
this.explosionResistance = getDouble("explosionResistance");
|
||||||
this.friction = getDouble("friction");
|
this.friction = getDouble("friction");
|
||||||
@ -91,6 +93,10 @@ public class Registry {
|
|||||||
return stateId;
|
return stateId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String translationKey() {
|
||||||
|
return translationKey;
|
||||||
|
}
|
||||||
|
|
||||||
public double hardness() {
|
public double hardness() {
|
||||||
return hardness;
|
return hardness;
|
||||||
}
|
}
|
||||||
@ -139,6 +145,7 @@ public class Registry {
|
|||||||
public static class MaterialEntry extends Entry {
|
public static class MaterialEntry extends Entry {
|
||||||
private final NamespaceID namespace;
|
private final NamespaceID namespace;
|
||||||
private final int id;
|
private final int id;
|
||||||
|
private final String translationKey;
|
||||||
private final int maxStackSize;
|
private final int maxStackSize;
|
||||||
private final boolean isFood;
|
private final boolean isFood;
|
||||||
private final Supplier<Block> blockSupplier;
|
private final Supplier<Block> blockSupplier;
|
||||||
@ -148,6 +155,7 @@ public class Registry {
|
|||||||
super(main, override);
|
super(main, override);
|
||||||
this.namespace = NamespaceID.from(namespace);
|
this.namespace = NamespaceID.from(namespace);
|
||||||
this.id = getInt("id");
|
this.id = getInt("id");
|
||||||
|
this.translationKey = getString("translationKey");
|
||||||
this.maxStackSize = getInt("maxStackSize", 64);
|
this.maxStackSize = getInt("maxStackSize", 64);
|
||||||
this.isFood = getBoolean("edible", false);
|
this.isFood = getBoolean("edible", false);
|
||||||
{
|
{
|
||||||
@ -176,7 +184,7 @@ public class Registry {
|
|||||||
this.equipmentSlot = null;
|
this.equipmentSlot = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
this.equipmentSlot = null;
|
this.equipmentSlot = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -190,6 +198,10 @@ public class Registry {
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String translationKey() {
|
||||||
|
return translationKey;
|
||||||
|
}
|
||||||
|
|
||||||
public int maxStackSize() {
|
public int maxStackSize() {
|
||||||
return maxStackSize;
|
return maxStackSize;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user