Merge pull request #1905 from tambry/facadeLoadFix

Fixed ghost facades from pre-6.0.x worlds
This commit is contained in:
SpaceToad 2014-06-24 06:44:08 +02:00
commit 286737b4ad

View file

@ -168,8 +168,14 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui
if (nbt.hasKey("facadeBlocks[" + i + "]")) { if (nbt.hasKey("facadeBlocks[" + i + "]")) {
// In this case, we're on legacy pre-6.0 facade loading // In this case, we're on legacy pre-6.0 facade loading
// mode. // mode.
facadeBlocks[i][0] = (Block) Block.blockRegistry.getObjectById int blockId = nbt.getInteger("facadeBlocks[" + i + "]");
(nbt.getInteger("facadeBlocks[" + i + "]"));
if (blockId != 0) {
facadeBlocks[i][0] = (Block) Block.blockRegistry.getObjectById(blockId);
} else {
facadeBlocks[i][0] = null;
}
facadeBlocks[i][1] = null; facadeBlocks[i][1] = null;
facadeMeta[i][0] = nbt.getInteger("facadeMeta[" + i + "]"); facadeMeta[i][0] = nbt.getInteger("facadeMeta[" + i + "]");