Add legacy migration to AWB
This should prevent wiping of the crafting grid on upgrade.
This commit is contained in:
parent
02e2fadcf4
commit
e43cf0a2b6
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue