mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-18 11:29:30 +00:00
Merge pull request #2008 from HenryLoenwind/fix
Added check for blocks without item
This commit is contained in:
commit
4a4077a50b
1 file changed
+5
-2
@@ -57,8 +57,11 @@ public final class PainterUtil {
|
||||
Block sourceId = PainterUtil.getSourceBlock(item);
|
||||
int meta = PainterUtil.getSourceBlockMetadata(item);
|
||||
if(sourceId != null) {
|
||||
ItemStack is = new ItemStack(Item.getItemFromBlock(sourceId), 1, meta);
|
||||
sourceName = is.getDisplayName();
|
||||
Item itemFromBlock = Item.getItemFromBlock(sourceId);
|
||||
if (itemFromBlock != null) {
|
||||
ItemStack is = new ItemStack(itemFromBlock, 1, meta);
|
||||
sourceName = is.getDisplayName();
|
||||
}
|
||||
}
|
||||
return Lang.localize("blockPainter.paintedWith") + " " + sourceName;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user