Class JobPlanter
java.lang.Object
com.minecolonies.core.colony.jobs.AbstractJob<AI,J>
com.minecolonies.core.colony.jobs.AbstractJobCrafter<EntityAIWorkPlanter,JobPlanter>
com.minecolonies.core.colony.jobs.JobPlanter
- All Implemented Interfaces:
IJob<EntityAIWorkPlanter>,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Class of the planter job.
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.jobs.AbstractJob
workBuilding, workBuildingPos, workModule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull EntityAIWorkPlanterGenerate your AI class to register.@NotNull net.minecraft.resources.ResourceLocationgetModel()Get the RenderBipedCitizen.Model to use when the Citizen performs this job role.booleanignoresDamage(@NotNull net.minecraft.world.damagesource.DamageSource damageSource) Check if the particular job ignores a particular damage type.Methods inherited from class com.minecolonies.core.colony.jobs.AbstractJobCrafter
addRequest, deserializeNBT, finishRequest, getAssignedTasks, getAssignedTasksFromDataStore, getCraftCounter, getCurrentTask, getMaxCraftingCount, getProgress, getSecondaryOutputs, getTaskQueue, hasTask, onRemoval, onTaskBeingResolved, onTaskBeingScheduled, onTaskDeletion, playSound, serializeNBT, serializeToView, setCraftCounter, setMaxCraftingCount, setProgressMethods inherited from class com.minecolonies.core.colony.jobs.AbstractJob
allowsAvoidance, assignTo, canAIBeInterrupted, clearActionsDone, createAI, equals, getActionsDone, getAsyncRequests, getBuildingPos, getCitizen, getColony, getDiseaseModifier, getJobRegistryEntry, getNameTagDescription, getWorkBuilding, getWorkerAI, getWorkModule, hasCheckedForFoodToday, hashCode, incrementActionsDone, incrementActionsDone, isIdling, markRequestSync, onStackPickUp, onWakeUp, pickupSuccess, processOfflineTime, resetAI, setCheckedForFood, setNameTag, setRegistryEntry, triggerDeathAchievementMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.jobs.IJob
getIdleSeverity, getInactivityLimit, getSaturationFactor, initEntityValues, isGuard, onLevelUp, triggerActivityChangeAction
-
Constructor Details
-
JobPlanter
Instantiates the job for the plantation.- Parameters:
entity- the citizen who becomes a planter
-
-
Method Details
-
getModel
@NotNull public @NotNull net.minecraft.resources.ResourceLocation getModel()Description copied from interface:IJobGet the RenderBipedCitizen.Model to use when the Citizen performs this job role.- Specified by:
getModelin interfaceIJob<EntityAIWorkPlanter>- Overrides:
getModelin classAbstractJobCrafter<EntityAIWorkPlanter,JobPlanter> - Returns:
- Model of the citizen.
-
generateAI
Generate your AI class to register.- Returns:
- your personal AI instance.
-
ignoresDamage
public boolean ignoresDamage(@NotNull @NotNull net.minecraft.world.damagesource.DamageSource damageSource) Description copied from interface:IJobCheck if the particular job ignores a particular damage type.- Specified by:
ignoresDamagein interfaceIJob<EntityAIWorkPlanter>- Overrides:
ignoresDamagein classAbstractJob<EntityAIWorkPlanter,JobPlanter> - Parameters:
damageSource- the damage source to check.- Returns:
- true if so.
-