Skip to content

Commit

Permalink
fix: verify the correct types
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus8448 committed Aug 22, 2024
1 parent bd7335f commit 4894377
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static <T extends MachineBlockEntity> 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);
Expand All @@ -118,7 +118,7 @@ public static <T extends MachineBlockEntity> 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);
}

Expand Down

0 comments on commit 4894377

Please sign in to comment.