Compatibility with drives from the previous version.
This commit is contained in:
@@ -11,6 +11,7 @@ import refinedstorage.storage.NBTStorage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
// @TODO: Rename to storage disk
|
||||
public class ItemStorageCell extends ItemBase {
|
||||
public static final int TYPE_1K = 0;
|
||||
public static final int TYPE_4K = 1;
|
||||
|
@@ -22,8 +22,8 @@ public class TileDrive extends TileMachine implements IStorageProvider, IStorage
|
||||
public static final String NBT_COMPARE = "Compare";
|
||||
public static final String NBT_MODE = "Mode";
|
||||
|
||||
private InventorySimple filterInventory = new InventorySimple("filters", 9, this);
|
||||
private InventorySimple inventory = new InventorySimple("drive", 8, this);
|
||||
private InventorySimple filterInventory = new InventorySimple("filters", 9, this);
|
||||
|
||||
private int priority = 0;
|
||||
private int compare = 0;
|
||||
@@ -59,8 +59,8 @@ public class TileDrive extends TileMachine implements IStorageProvider, IStorage
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
InventoryUtils.restoreInventory(filterInventory, 0, nbt);
|
||||
InventoryUtils.restoreInventory(inventory, 1, nbt);
|
||||
InventoryUtils.restoreInventory(inventory, 0, nbt);
|
||||
InventoryUtils.restoreInventory(filterInventory, 1, nbt);
|
||||
|
||||
if (nbt.hasKey(NBT_PRIORITY)) {
|
||||
priority = nbt.getInteger(NBT_PRIORITY);
|
||||
@@ -79,8 +79,8 @@ public class TileDrive extends TileMachine implements IStorageProvider, IStorage
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
InventoryUtils.saveInventory(filterInventory, 0, nbt);
|
||||
InventoryUtils.saveInventory(inventory, 1, nbt);
|
||||
InventoryUtils.saveInventory(inventory, 0, nbt);
|
||||
InventoryUtils.saveInventory(filterInventory, 1, nbt);
|
||||
|
||||
nbt.setInteger(NBT_PRIORITY, priority);
|
||||
nbt.setInteger(NBT_COMPARE, compare);
|
||||
|
Reference in New Issue
Block a user