From 984abd9590e753c32ec2d1186c01a8f143b663d2 Mon Sep 17 00:00:00 2001 From: Raoul Van den Berge Date: Tue, 14 Jun 2016 18:01:56 +0200 Subject: [PATCH] Fixed creative storage blocks/disks not working --- src/main/java/refinedstorage/api/storage/NBTStorage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/refinedstorage/api/storage/NBTStorage.java b/src/main/java/refinedstorage/api/storage/NBTStorage.java index 3cdac83ea..5b5d515df 100755 --- a/src/main/java/refinedstorage/api/storage/NBTStorage.java +++ b/src/main/java/refinedstorage/api/storage/NBTStorage.java @@ -117,7 +117,7 @@ public abstract class NBTStorage implements IStorage { public ItemStack push(ItemStack stack, int size, boolean simulate) { for (ItemStack otherStack : stacks) { if (RefinedStorageUtils.compareStackNoQuantity(otherStack, stack)) { - if (getStored() + size > getCapacity()) { + if (getCapacity() != -1 && getStored() + size > getCapacity()) { int remainingSpace = getCapacity() - getStored(); if (remainingSpace <= 0) { @@ -147,7 +147,7 @@ public abstract class NBTStorage implements IStorage { } } - if (getStored() + size > getCapacity()) { + if (getCapacity() != -1 && getStored() + size > getCapacity()) { int remainingSpace = getCapacity() - getStored(); if (remainingSpace <= 0) {