From 4237bbe1279be4b982bbb242402681b90075422b Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 24 Jun 2017 00:09:54 +0200 Subject: [PATCH] Fixed Disk Drive giving incorrect capacity for creative and debug storage disks --- CHANGELOG.md | 1 + .../raoulvdberge/refinedstorage/tile/TileDiskDrive.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d010b39e..6ad84ecad 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixed Interface extracting from itself when trying to keep items in stock (raoulvdberge) - Fixed Quartz Enriched Iron recipe only giving 1 instead of 4 (jhjaggars) - Fixed Debug Storage disks not working correctly (raoulvdberge) +- Fixed Disk Drive giving incorrect capacity for creative and debug storage disks (raoulvdberge) - The Portable Grid now exposes an inventory for interaction with other mods or vanilla (raoulvdberge) - The Interface now exposes the entire storage inventory (if no slots are set for exporting) for interaction with other mods or vanilla (raoulvdberge) - The Relay now reacts instantly to a redstone signal again, removed throttling for it (raoulvdberge) diff --git a/src/main/java/com/raoulvdberge/refinedstorage/tile/TileDiskDrive.java b/src/main/java/com/raoulvdberge/refinedstorage/tile/TileDiskDrive.java index 73b6a5933..2ad4bcd86 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/tile/TileDiskDrive.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/tile/TileDiskDrive.java @@ -51,12 +51,20 @@ public class TileDiskDrive extends TileNode { for (IStorageDisk storage : tile.getNode().getItemStorages()) { if (storage != null) { + if (storage.getCapacity() == -1) { + return -1; + } + capacity += storage.getCapacity(); } } for (IStorageDisk storage : tile.getNode().getFluidStorages()) { if (storage != null) { + if (storage.getCapacity() == -1) { + return -1; + } + capacity += storage.getCapacity(); } }