This is why I do playtesting

This commit is contained in:
Raoul Van den Berge
2016-06-04 18:18:05 +02:00
parent 7d8a4e0718
commit 69ff85ffc5
3 changed files with 4 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ public abstract class NBTStorage implements IStorage {
} }
} }
stacks.add(stack); stacks.add(stack.copy());
markDirty(); markDirty();
} }

View File

@@ -68,7 +68,7 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
if (storageUnit != null) { if (storageUnit != null) {
if (storageUnit.getStoredItemType() == null) { if (storageUnit.getStoredItemType() == null) {
storageUnit.setStoredItemType(stack, stack.stackSize); storageUnit.setStoredItemType(stack.copy(), stack.stackSize);
} else { } else {
storageUnit.setStoredItemCount(storageUnit.getStoredItemType().stackSize + stack.stackSize); storageUnit.setStoredItemCount(storageUnit.getStoredItemType().stackSize + stack.stackSize);
} }
@@ -76,7 +76,7 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
IItemHandler handler = getItemHandler(); IItemHandler handler = getItemHandler();
if (handler != null) { if (handler != null) {
ItemHandlerHelper.insertItem(handler, stack, false); ItemHandlerHelper.insertItem(handler, stack.copy(), false);
} }
} }
} }

View File

@@ -402,7 +402,7 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
ItemStack newStack = null; ItemStack newStack = null;
for (IStorage storage : storages) { for (IStorage storage : storages) {
ItemStack took = storage.take(stack, requested - received, flags); ItemStack took = storage.take(stack, requested, flags);
if (took != null) { if (took != null) {
if (newStack == null) { if (newStack == null) {