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(); } }