Search in sources :

Example 1 with JobFarmer

use of com.minecolonies.coremod.colony.jobs.JobFarmer in project minecolonies by Minecolonies.

the class BuildingFarmer method createJob.

@NotNull
@Override
public AbstractJob createJob(@NotNull final CitizenData citizen) {
    if (!farmerFields.isEmpty()) {
        for (@NotNull final Field field : farmerFields) {
            final Field colonyField = getColony().getField(field.getID());
            if (colonyField != null) {
                colonyField.setOwner(citizen.getName());
            }
            field.setOwner(citizen.getName());
        }
    }
    return new JobFarmer(citizen);
}
Also used : Field(com.minecolonies.coremod.entity.ai.citizen.farmer.Field) JobFarmer(com.minecolonies.coremod.colony.jobs.JobFarmer) NotNull(org.jetbrains.annotations.NotNull) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

JobFarmer (com.minecolonies.coremod.colony.jobs.JobFarmer)1 Field (com.minecolonies.coremod.entity.ai.citizen.farmer.Field)1 NotNull (org.jetbrains.annotations.NotNull)1