From 0359770fad3755238f6edf9d74433f69be9e9b95 Mon Sep 17 00:00:00 2001 From: Starforcraft Date: Tue, 10 Sep 2024 20:50:05 +0200 Subject: [PATCH] feat: resolve errors --- .../storage/diskinterface/DiskInterfaceTestPlots.java | 11 ++++------- 1 file changed, 4 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 2a148b947..d09b68a14 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 @@ -2,16 +2,14 @@ import com.refinedmods.refinedstorage.api.core.Action; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; +import com.refinedmods.refinedstorage.api.storage.Storage; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.storage.PlayerActor; -import com.refinedmods.refinedstorage.common.api.storage.SerializableStorage; import com.refinedmods.refinedstorage.common.content.Items; import com.refinedmods.refinedstorage.common.storage.ItemStorageVariant; import com.refinedmods.refinedstorage.common.support.FilteredContainer; import com.refinedmods.refinedstorage.common.support.direction.BiDirection; -import java.util.Optional; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.gametest.framework.GameTestAssertException; @@ -50,7 +48,7 @@ static void addDiskToDiskInterface(final GameTestHelper helper, final ItemStack diskItem = new ItemStack(Items.INSTANCE.getItemStorageDisk(ItemStorageVariant.SIXTY_FOUR_K)); diskItem.inventoryTick(helper.getLevel(), helper.makeMockPlayer(GameType.SURVIVAL), 0, false); - final SerializableStorage storage = getSerializableStorageFromDisk(helper, diskItem); + final Storage storage = getStorageFromDisk(helper, diskItem); if (resources.length > 0) { final PlayerActor actor = new PlayerActor(helper.makeMockPlayer(GameType.SURVIVAL)); for (final ResourceAmount resource : resources) { @@ -74,7 +72,7 @@ static void isDiskInOutputWithAmount(final GameTestHelper helper, final FilteredContainer diskInterfaceContainer = diskInterfaceBlockEntity.getDiskInventory(); final ItemStack diskItem = diskInterfaceContainer.getItem(3); - final SerializableStorage storage = getSerializableStorageFromDisk(helper, diskItem); + final Storage storage = getStorageFromDisk(helper, diskItem); helper.assertTrue(!diskItem.isEmpty(), "Could not find a Storage Disk in the output slot"); helper.assertTrue(storage.getStored() == storedAmount, "Expected Storage Disk stored amount " @@ -82,11 +80,10 @@ static void isDiskInOutputWithAmount(final GameTestHelper helper, } private static Storage getStorageFromDisk(final GameTestHelper helper, - final ItemStack diskItem) { + final ItemStack diskItem) { return RefinedStorageApi.INSTANCE .getStorageContainerItemHelper() .resolveStorage(RefinedStorageApi.INSTANCE.getStorageRepository(helper.getLevel()), diskItem) .orElseThrow(() -> new GameTestAssertException("Couldn't find SerializableStorage from Storage Disk")); - } }