mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 12:09:39 +00:00
Fix #280, crash on viewing the name of research notes from 1.6.4
This commit is contained in:
1 parent
4fcb9cb221
commit
5e9cc9e2b1
1 file changed
+6
-1
@@ -235,7 +235,12 @@ public class ItemResearchNote extends ItemForestry {
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack itemstack) {
|
||||
ResearchNote note = new ResearchNote(itemstack.getTagCompound());
|
||||
return StringUtil.localizeAndFormatRaw(getUnlocalizedName(itemstack) + ".name", note.researcher.getName());
|
||||
String researcherName;
|
||||
if (note.researcher == null)
|
||||
researcherName = "Sengir";
|
||||
else
|
||||
researcherName = note.researcher.getName();
|
||||
return StringUtil.localizeAndFormatRaw(getUnlocalizedName(itemstack) + ".name", researcherName);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
|
||||
Reference in new issue
Block a user