Merge pull request #1910 from tambry/facadeLoadFix6.1
Fix ghost facades from pre-6.0.x worlds
This commit is contained in:
commit
63bf1ca0df
1 changed files with 6 additions and 2 deletions
|
@ -174,8 +174,12 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui
|
||||||
if (nbt.hasKey("facadeBlocks[" + i + "]")) {
|
if (nbt.hasKey("facadeBlocks[" + i + "]")) {
|
||||||
// 5.0.x
|
// 5.0.x
|
||||||
Block block = (Block) Block.blockRegistry.getObjectById(nbt.getInteger("facadeBlocks[" + i + "]"));
|
Block block = (Block) Block.blockRegistry.getObjectById(nbt.getInteger("facadeBlocks[" + i + "]"));
|
||||||
int metadata = nbt.getInteger("facadeMeta[" + i + "]");
|
int blockId = nbt.getInteger("facadeBlocks[" + i + "]");
|
||||||
pluggable = new ItemFacade.FacadePluggable(new ItemFacade.FacadeState[]{ItemFacade.FacadeState.create(block, metadata)});
|
|
||||||
|
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]")) {
|
} else if (nbt.hasKey("facadeBlocksStr[" + i + "][0]")) {
|
||||||
// 6.0.x
|
// 6.0.x
|
||||||
ItemFacade.FacadeState mainState = ItemFacade.FacadeState.create(
|
ItemFacade.FacadeState mainState = ItemFacade.FacadeState.create(
|
||||||
|
|
Loading…
Reference in a new issue