mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-20 03:59:49 +00:00
Fix crash with invalid metadatas
This commit is contained in:
1 parent
6c06ee151a
commit
448bb9e173
1 file changed
+4
-1
@@ -63,7 +63,10 @@ public class ItemMetaDynamic extends Item {
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
int meta = stack.getMetadata(); // should call getMetadata below
|
||||
return super.getUnlocalizedName(stack) + "." + LocUtils.makeLocString(names.get(meta));
|
||||
if(isValid(meta))
|
||||
return super.getUnlocalizedName(stack) + "." + LocUtils.makeLocString(names.get(meta));
|
||||
else
|
||||
return super.getUnlocalizedName(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user