use of com.minecolonies.coremod.colony.workorders.WorkOrderBuildMiner in project minecolonies by ldtteam.
the class BuildingMiner method searchWorkOrder.
@Override
public void searchWorkOrder() {
final ICitizenData citizen = getFirstModuleOccurance(WorkerBuildingModule.class).getFirstCitizen();
if (citizen == null) {
return;
}
final List<WorkOrderBuildMiner> list = getColony().getWorkManager().getOrderedList(WorkOrderBuildMiner.class, getPosition());
for (final WorkOrderBuildMiner wo : list) {
if (this.getID().equals(wo.getMinerBuilding())) {
citizen.getJob(JobMiner.class).setWorkOrder(wo);
wo.setClaimedBy(citizen);
return;
}
}
}
Aggregations