Fix missing check on channel capability getter
@@ -88,12 +88,14 @@ public class ChannelTileEntity extends TileEntity implements ITickableTileEntity
@Override
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction side) {
// top side gets the insert direct
+ if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
if (side == null || side == Direction.UP) {
return topHandler.cast();
}
// side tanks keep track of which side inserts
if (side != Direction.DOWN && getBlockState().get(ChannelBlock.DIRECTION_MAP.get(side)) == ChannelConnection.IN) {
return sideTanks.get(side).cast();
+ }
}
return super.getCapability(capability, side);
