geforkt von Mirrors/Paper
Fixed Material.getData returning for "dull" materials with no fancy dataclass
By: Dinnerbone <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Ursprung
a8e72bdb91
Commit
4d1700d1d9
@ -306,7 +306,7 @@ public enum Material {
|
|||||||
* @return MaterialData associated with this Material
|
* @return MaterialData associated with this Material
|
||||||
*/
|
*/
|
||||||
public Class<? extends MaterialData> getData() {
|
public Class<? extends MaterialData> getData() {
|
||||||
return data;
|
return (data == null) ? MaterialData.class : data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -318,7 +318,7 @@ public enum Material {
|
|||||||
*/
|
*/
|
||||||
public MaterialData getNewData(final byte raw) {
|
public MaterialData getNewData(final byte raw) {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
return null;
|
return new MaterialData(id, raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren