mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-23 21:39:40 +00:00
null handling for BasicBlockType.get
(cherry picked from commit 37576936e187e9ba347538bed1cc35765b226c5f)
This commit is contained in:
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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user