add meta object to storage items

This commit is contained in:
Raoul Van den Berge
2015-12-16 00:04:44 +01:00
parent e43ceefd4e
commit 16c66d2be1
10 changed files with 172 additions and 156 deletions

View File

@@ -7,6 +7,7 @@ import net.minecraft.tileentity.TileEntity;
import storagecraft.storage.IStorage;
import storagecraft.storage.IStorageProvider;
import storagecraft.storage.StorageItem;
import storagecraft.util.InventoryUtil;
public class TileStorageProxy extends TileMachine implements IStorageProvider, IStorage {
private IInventory inventory;
@@ -57,7 +58,7 @@ public class TileStorageProxy extends TileMachine implements IStorageProvider, I
inventory.setInventorySlotContents(i, stack);
return;
} else if (StorageItem.equalsIgnoreQuantity(slot, stack)) {
} else if (InventoryUtil.equalsIgnoreQuantity(slot, stack)) {
int toAdd = toGo;
if (slot.stackSize + toAdd > slot.getMaxStackSize()) {
@@ -86,7 +87,7 @@ public class TileStorageProxy extends TileMachine implements IStorageProvider, I
for (int i = 0; i < inventory.getSizeInventory(); ++i) {
ItemStack slot = inventory.getStackInSlot(i);
if (slot != null && StorageItem.equalsIgnoreQuantity(slot, stack)) {
if (slot != null && InventoryUtil.equalsIgnoreQuantity(slot, stack)) {
if (quantity > slot.stackSize) {
quantity = slot.stackSize;
}
@@ -117,7 +118,7 @@ public class TileStorageProxy extends TileMachine implements IStorageProvider, I
if (slot == null) {
return true;
} else if (StorageItem.equalsIgnoreQuantity(slot, stack)) {
} else if (InventoryUtil.equalsIgnoreQuantity(slot, stack)) {
int toAdd = toGo;
if (slot.stackSize + toAdd > slot.getMaxStackSize()) {