From 48943775d40823d38b2f1dc22816345d3520ecd4 Mon Sep 17 00:00:00 2001 From: marcus8448 Date: Thu, 22 Aug 2024 11:59:25 -0700 Subject: [PATCH] fix: verify the correct types --- .../machinelib/api/block/entity/MachineBlockEntity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/dev/galacticraft/machinelib/api/block/entity/MachineBlockEntity.java b/src/main/java/dev/galacticraft/machinelib/api/block/entity/MachineBlockEntity.java index 38daea9..379933b 100644 --- a/src/main/java/dev/galacticraft/machinelib/api/block/entity/MachineBlockEntity.java +++ b/src/main/java/dev/galacticraft/machinelib/api/block/entity/MachineBlockEntity.java @@ -108,7 +108,7 @@ public static void registerProviders(@NotNull Blo EnergyStorage.SIDED.registerForBlockEntity((machine, direction) -> { if (direction == null) return machine.energyStorage().getExposedStorage(ResourceFlow.BOTH); IOFace ioFace = machine.getIOConfig().get(Objects.requireNonNull(BlockFace.from(machine.getBlockState(), direction))); - return ioFace.getType().willAcceptResource(ResourceType.FLUID) ? machine.energyStorage().getExposedStorage(ioFace.getFlow()) : null; + return ioFace.getType().willAcceptResource(ResourceType.ENERGY) ? machine.energyStorage().getExposedStorage(ioFace.getFlow()) : null; }, type); ItemStorage.SIDED.registerForBlockEntity((machine, direction) -> { if (direction == null) return machine.itemStorage().getExposedStorage(ResourceFlow.BOTH); @@ -118,7 +118,7 @@ public static void registerProviders(@NotNull Blo FluidStorage.SIDED.registerForBlockEntity((machine, direction) -> { if (direction == null) return machine.fluidStorage().getExposedStorage(ResourceFlow.BOTH); IOFace ioFace = machine.getIOConfig().get(Objects.requireNonNull(BlockFace.from(machine.getBlockState(), direction))); - return ioFace.getType().willAcceptResource(ResourceType.ENERGY) ? machine.fluidStorage().getExposedStorage(ioFace.getFlow()) : null; + return ioFace.getType().willAcceptResource(ResourceType.FLUID) ? machine.fluidStorage().getExposedStorage(ioFace.getFlow()) : null; }, type); }