Merge pull request #1910 from tambry/facadeLoadFix6.1

Fix ghost facades from pre-6.0.x worlds
This commit is contained in:
SpaceToad 2014-06-25 22:56:13 +02:00
commit 63bf1ca0df

View file

@ -174,8 +174,12 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui
if (nbt.hasKey("facadeBlocks[" + i + "]")) {
// 5.0.x
Block block = (Block) Block.blockRegistry.getObjectById(nbt.getInteger("facadeBlocks[" + i + "]"));
int blockId = nbt.getInteger("facadeBlocks[" + i + "]");
if (blockId != 0) {
int metadata = nbt.getInteger("facadeMeta[" + i + "]");
pluggable = new ItemFacade.FacadePluggable(new ItemFacade.FacadeState[]{ItemFacade.FacadeState.create(block, metadata)});
}
} else if (nbt.hasKey("facadeBlocksStr[" + i + "][0]")) {
// 6.0.x
ItemFacade.FacadeState mainState = ItemFacade.FacadeState.create(