Skip to content

Commit

Permalink
Update refinedstorage-neoforge/src/test/java/com/refinedmods/refineds…
Browse files Browse the repository at this point in the history
…torage/common/storage/diskinterface/DiskInterfaceTestPlots.java

Co-authored-by: Raoul <[email protected]>
  • Loading branch information
starforcraft and raoulvdberge authored Sep 10, 2024
1 parent 44ef62e commit de2a734
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,10 @@ static void isDiskInOutputWithAmount(final GameTestHelper helper,

private static Storage getStorageFromDisk(final GameTestHelper helper,
final ItemStack diskItem) {
final Optional<SerializableStorage> 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();
}
}

0 comments on commit de2a734

Please sign in to comment.