use of crazypants.enderio.base.machine.modes.IoMode in project EnderIO by SleepyTrousers.
the class TileTransceiver method canReceive.
// ---------------- Fluid Handling
public boolean canReceive(Set<Channel> channels, Fluid fluid) {
if (inFluidFill) {
return false;
}
if (!hasRecieveChannel(channels, ChannelType.FLUID)) {
return false;
}
FluidStack offer = new FluidStack(fluid, 1);
Map<EnumFacing, IFluidWrapper> neighbours = FluidWrapper.wrapNeighbours(world, pos);
for (Entry<EnumFacing, IFluidWrapper> entry : neighbours.entrySet()) {
IoMode mode = getIoMode(entry.getKey());
if (mode.canOutput() && entry.getValue().offer(offer) > 0) {
return true;
}
}
return false;
}
Aggregations