Add legacy migration to AWB

This should prevent wiping of the crafting grid on upgrade.
This commit is contained in:
CovertJaguar 2013-05-28 23:16:56 -07:00
parent 02e2fadcf4
commit e43cf0a2b6

View file

@ -140,6 +140,15 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
super.readFromNBT(data);
inv.readFromNBT(data);
Utils.readInvFromNBT(craftMatrix, "matrix", data);
// Legacy Code
if (data.hasKey("stackList")) {
ItemStack[] stacks = new ItemStack[9];
Utils.readStacksFromNBT(data, "stackList", stacks);
for (int i = 0; i < 9; i++) {
craftMatrix.setInventorySlotContents(i, stacks[i]);
}
}
}
@Override