mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Fix cardboard box crash
This commit is contained in:
1 parent
c96d13a2e6
commit
db2751c84d
1 file changed
+12
-9
@@ -49,16 +49,19 @@ public class ItemBlockCardboardBox extends ItemBlock
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List<String> list, boolean flag)
|
||||
{
|
||||
list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.blockData") + ": " + LangUtils.transYesNo(getBlockData(itemstack) != null));
|
||||
|
||||
if(getBlockData(itemstack) != null)
|
||||
BlockData data = getBlockData(itemstack);
|
||||
|
||||
if(data != null)
|
||||
{
|
||||
list.add(LangUtils.localize("tooltip.block") + ": " + new ItemStack(getBlockData(itemstack).block, getBlockData(itemstack).meta).getDisplayName());
|
||||
list.add(LangUtils.localize("tooltip.meta") + ": " + getBlockData(itemstack).meta);
|
||||
|
||||
if(getBlockData(itemstack).tileTag != null)
|
||||
{
|
||||
list.add(LangUtils.localize("tooltip.tile") + ": " + getBlockData(itemstack).tileTag.getString("id"));
|
||||
}
|
||||
try {
|
||||
list.add(LangUtils.localize("tooltip.block") + ": " + new ItemStack(data.block, data.meta).getDisplayName());
|
||||
list.add(LangUtils.localize("tooltip.meta") + ": " + data.meta);
|
||||
|
||||
if(data.tileTag != null)
|
||||
{
|
||||
list.add(LangUtils.localize("tooltip.tile") + ": " + data.tileTag.getString("id"));
|
||||
}
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user