Fix Material#getTranslationKey for Block Materials (#5294)
* Fix Material#getTranslationKey for Block Materials * Cache the result of Material#isBlock
This commit is contained in:
@@ -92,6 +92,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ @Override
|
||||
+ public String getTranslationKey(Material mat) {
|
||||
+ if (mat.isBlock()) {
|
||||
+ return getBlock(mat).getDescriptionId();
|
||||
+ }
|
||||
+ return getItem(mat).getOrCreateDescriptionId();
|
||||
+ }
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user