use of buildcraft.api.core.IWorldProperty in project BuildCraft by BuildCraft.
the class BoardRobotPump method update.
@Override
public void update() {
final IWorldProperty isFluidSource = BuildCraftAPI.getWorldProperty("fluidSource");
FluidStack tank = robot.getTankInfo(null)[0].fluid;
if (tank != null && tank.amount > 0) {
startDelegateAI(new AIRobotGotoStationAndUnloadFluids(robot));
} else {
updateFilter();
startDelegateAI(new AIRobotSearchAndGotoBlock(robot, false, new IBlockFilter() {
@Override
public boolean matches(World world, BlockPos pos) {
if (isFluidSource.get(world, pos) && !robot.getRegistry().isTaken(new ResourceIdBlock(pos))) {
return matchesGateFilter(world, pos);
} else {
return false;
}
}
}));
}
}
Aggregations