From 78a06e5f35040617f7d371fe739b6ccfb32abdee Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Mon, 23 Jun 2014 11:41:27 +0300 Subject: [PATCH] Fixed ghost facades from pre-6.0.x --- common/buildcraft/transport/TileGenericPipe.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 19786b5d..be0de589 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -168,8 +168,14 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui if (nbt.hasKey("facadeBlocks[" + i + "]")) { // In this case, we're on legacy pre-6.0 facade loading // mode. - facadeBlocks[i][0] = (Block) Block.blockRegistry.getObjectById - (nbt.getInteger("facadeBlocks[" + i + "]")); + int blockId = nbt.getInteger("facadeBlocks[" + i + "]"); + + if (blockId != 0) { + facadeBlocks[i][0] = (Block) Block.blockRegistry.getObjectById(blockId); + } else { + facadeBlocks[i][0] = null; + } + facadeBlocks[i][1] = null; facadeMeta[i][0] = nbt.getInteger("facadeMeta[" + i + "]");