From a54d046739ce13dc97186751a22e520cd40e25c5 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 8 Jul 2017 10:51:30 +0200 Subject: [PATCH] Update changelog --- CHANGELOG.md | 4 ++-- .../storagedrawers/StorageItemItemRepository.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9978c451b..85044ee08 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ ### 1.5.8 - Updated Forge to 2400 (raoulvdberge) -- Updated Storage Drawers API (raoulvdberge) +- Updated Storage Drawers API (raoulvdberge, jaquadro) - Fixed bug where disks have to be re-inserted in the Disk Drive in order to work again after rejoining a chunk (raoulvdberge) -- Fixed bug where items inserted in Storage Drawers through External Storage with a Drawer Controller wouldn't respect drawer priority rules (raoulvdberge) +- Fixed bug where items inserted in Storage Drawers through External Storage with a Drawer Controller wouldn't respect drawer priority rules (raoulvdberge, jaquadro) - Fixed crash on server when getting an advancement (raoulvdberge) - Removed migration support for worlds from MC 1.10.2. To migrate your world to MC 1.12 from MC 1.10.2, first open it in MC 1.11.2 (raoulvdberge) - Autocrafting can now fill water bottles with water from the fluid storage - regular bottles or pattern for regular bottles are required (raoulvdberge) diff --git a/src/main/java/com/raoulvdberge/refinedstorage/integration/storagedrawers/StorageItemItemRepository.java b/src/main/java/com/raoulvdberge/refinedstorage/integration/storagedrawers/StorageItemItemRepository.java index 9ec16c197..a4ca9b53a 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/integration/storagedrawers/StorageItemItemRepository.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/integration/storagedrawers/StorageItemItemRepository.java @@ -27,9 +27,9 @@ public class StorageItemItemRepository extends StorageItemExternal { private NetworkNodeExternalStorage externalStorage; private Supplier groupSupplier; - public StorageItemItemRepository(NetworkNodeExternalStorage externalStorage, Supplier repositorySupplier) { + public StorageItemItemRepository(NetworkNodeExternalStorage externalStorage, Supplier groupSupplier) { this.externalStorage = externalStorage; - this.groupSupplier = repositorySupplier; + this.groupSupplier = groupSupplier; } @Override @@ -100,6 +100,7 @@ public class StorageItemItemRepository extends StorageItemExternal { for (int slot : group.getAccessibleDrawerSlots()) { IDrawer drawer = group.getDrawer(slot); + if (drawer.isEnabled()) { capacity += drawer.getMaxCapacity(); } @@ -109,11 +110,12 @@ public class StorageItemItemRepository extends StorageItemExternal { return Integer.MAX_VALUE; } - return (int)capacity; + return (int) capacity; } private IItemRepository getRepositoryFromSupplier() { IDrawerGroup group = groupSupplier.get(); + if (group == null) { return null; }