@Nullable @Override public FluidStack drain(FluidStack resource, boolean doDrain) { if (from == null || augmentCoilDuct || from.ordinal() != facing) { if (resource.equals(fuelTank.getFluid())) { return fuelTank.drain(resource.amount, doDrain); } if (resource.equals(coolantTank.getFluid())) { return coolantTank.drain(resource.amount, doDrain); } } return null; }
@Nullable @Override public FluidStack drain(FluidStack resource, boolean doDrain) { if (from == null || augmentCoilDuct || from.ordinal() != facing) { if (resource.equals(fuelTank.getFluid())) { return fuelTank.drain(resource.amount, doDrain); } if ((augmentBoiler || augmentCoolant) && resource.equals(coolantTank.getFluid())) { return coolantTank.drain(resource.amount, doDrain); } } return null; }
private int countFluid(IFluidHandler handler, @Nullable FluidStack matcher) { int cnt = 0; for (IFluidTankProperties properties : handler.getTankProperties()) { if (properties.getContents() != null && (matcher == null || matcher.equals(properties.getContents()))) { cnt += properties.getContents().amount; } } return cnt; }
FluidConnectorSettings settings = entry.getValue(); if (settings.getMatcher() == null || settings.getMatcher().equals(stack)) { BlockPos consumerPos = context.findConsumerPosition(entry.getKey().getConsumerId()); if (consumerPos != null) {
if(commonFluid == null) { commonFluid = fluidStack; } else if(!commonFluid.equals(fluidStack.getFluid())) { return ItemStack.EMPTY;