Add fallback facade loading for support migration from 5.0.x

This commit is contained in:
Prototik 2014-05-10 13:25:20 +08:00
parent b2f8cf102d
commit 12d321491e

View file

@ -176,8 +176,18 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
facadeBlocks[i][1] = null;
}
facadeMeta[i][0] = nbt.getInteger("facadeMeta[" + i + "][0]");
facadeMeta[i][1] = nbt.getInteger("facadeMeta[" + i + "][1]");
if (nbt.hasKey("facadeBlocks[" + i + "]")) {
facadeBlocks[i][0] = (Block) Block.blockRegistry.getObjectById(nbt.getInteger("facadeBlocks[" + i + "]"));
facadeBlocks[i][1] = null;
}
if (nbt.hasKey("facadeMeta[" + i + "]")) {
facadeMeta[i][0] = nbt.getInteger("facadeMeta[" + i + "]");
facadeMeta[i][1] = 0;
} else {
facadeMeta[i][0] = nbt.getInteger("facadeMeta[" + i + "][0]");
facadeMeta[i][1] = nbt.getInteger("facadeMeta[" + i + "][1]");
}
plugs[i] = nbt.getBoolean("plug[" + i + "]");
robotStations[i] = nbt.getBoolean("robotStation[" + i + "]");