From de2a7342f3a2b282c95073c345357b28dd7d0a73 Mon Sep 17 00:00:00 2001 From: Starforcraft Date: Tue, 10 Sep 2024 20:48:43 +0200 Subject: [PATCH] Update refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/storage/diskinterface/DiskInterfaceTestPlots.java Co-authored-by: Raoul --- .../storage/diskinterface/DiskInterfaceTestPlots.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/storage/diskinterface/DiskInterfaceTestPlots.java b/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/storage/diskinterface/DiskInterfaceTestPlots.java index 5b649bd3a..2a148b947 100644 --- a/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/storage/diskinterface/DiskInterfaceTestPlots.java +++ b/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/storage/diskinterface/DiskInterfaceTestPlots.java @@ -83,14 +83,10 @@ static void isDiskInOutputWithAmount(final GameTestHelper helper, private static Storage getStorageFromDisk(final GameTestHelper helper, final ItemStack diskItem) { - final Optional serializableStorage = RefinedStorageApi.INSTANCE + return RefinedStorageApi.INSTANCE .getStorageContainerItemHelper() - .resolveStorage(RefinedStorageApi.INSTANCE.getStorageRepository(helper.getLevel()), diskItem); + .resolveStorage(RefinedStorageApi.INSTANCE.getStorageRepository(helper.getLevel()), diskItem) + .orElseThrow(() -> new GameTestAssertException("Couldn't find SerializableStorage from Storage Disk")); - if (serializableStorage.isEmpty()) { - throw new GameTestAssertException("Couldn't find SerializableStorage from Storage Disk"); - } - - return serializableStorage.get(); } }