Fixed creative storage blocks/disks not working

This commit is contained in:
Raoul Van den Berge
2016-06-14 18:01:56 +02:00
parent d944070626
commit 984abd9590

View File

@@ -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) {