null handling for BasicBlockType.get

(cherry picked from commit 37576936e187e9ba347538bed1cc35765b226c5f)
This commit is contained in:
Xander Victory committed 2017-10-03 09:23:35 +08:00
1 parent 55a036f78a
commit 8446e1e1b4
2 files changed
+8 -2

No files matched your search

@@ -145,7 +145,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
{
BasicBlockType type = BasicBlockType.get(itemstack);
if(type.hasDescription)
if(type != null && type.hasDescription)
{
if(!MekKeyHandler.getIsKeyPressed(MekanismKeyHandler.sneakKey))
{
@@ -290,7 +290,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
if(type != null)
{
String name = getUnlocalizedName() + "." + BasicBlockType.get(itemstack).name;
String name = getUnlocalizedName() + "." + type.name;
if(type == BasicBlockType.BIN || type == BasicBlockType.INDUCTION_CELL || type == BasicBlockType.INDUCTION_PROVIDER)
{