Skip to content

Commit 4894377

Browse files
committed
fix: verify the correct types
1 parent bd7335f commit 4894377

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/dev/galacticraft/machinelib/api/block/entity/MachineBlockEntity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static <T extends MachineBlockEntity> void registerProviders(@NotNull Blo
108108
EnergyStorage.SIDED.registerForBlockEntity((machine, direction) -> {
109109
if (direction == null) return machine.energyStorage().getExposedStorage(ResourceFlow.BOTH);
110110
IOFace ioFace = machine.getIOConfig().get(Objects.requireNonNull(BlockFace.from(machine.getBlockState(), direction)));
111-
return ioFace.getType().willAcceptResource(ResourceType.FLUID) ? machine.energyStorage().getExposedStorage(ioFace.getFlow()) : null;
111+
return ioFace.getType().willAcceptResource(ResourceType.ENERGY) ? machine.energyStorage().getExposedStorage(ioFace.getFlow()) : null;
112112
}, type);
113113
ItemStorage.SIDED.registerForBlockEntity((machine, direction) -> {
114114
if (direction == null) return machine.itemStorage().getExposedStorage(ResourceFlow.BOTH);
@@ -118,7 +118,7 @@ public static <T extends MachineBlockEntity> void registerProviders(@NotNull Blo
118118
FluidStorage.SIDED.registerForBlockEntity((machine, direction) -> {
119119
if (direction == null) return machine.fluidStorage().getExposedStorage(ResourceFlow.BOTH);
120120
IOFace ioFace = machine.getIOConfig().get(Objects.requireNonNull(BlockFace.from(machine.getBlockState(), direction)));
121-
return ioFace.getType().willAcceptResource(ResourceType.ENERGY) ? machine.fluidStorage().getExposedStorage(ioFace.getFlow()) : null;
121+
return ioFace.getType().willAcceptResource(ResourceType.FLUID) ? machine.fluidStorage().getExposedStorage(ioFace.getFlow()) : null;
122122
}, type);
123123
}
124124

0 commit comments

Comments
 (0)