Class JobKnight
java.lang.Object
com.minecolonies.core.colony.jobs.AbstractJob<AbstractEntityAIGuard<JobKnight,? extends AbstractBuildingGuards>,JobKnight>
com.minecolonies.core.colony.jobs.AbstractJobGuard<JobKnight>
com.minecolonies.core.colony.jobs.guard.JobKnight
- All Implemented Interfaces:
IJob<AbstractEntityAIGuard<JobKnight,,? extends AbstractBuildingGuards>> IJobWithColonyFlag,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- Direct Known Subclasses:
JobHuscarl
The Knight's job class
-
Field Summary
FieldsFields inherited from class com.minecolonies.core.colony.jobs.AbstractJob
workBuilding, workBuildingPos, workModule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.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.voidWhat to do when the colony flag changes.voidLevelup actions on citizen levelup, allows custom actions based on JobsMethods inherited from class com.minecolonies.core.colony.jobs.AbstractJobGuard
allowsAvoidance, generateAI, getSaturationFactor, initEntityValues, isAsleep, isGuard, triggerDeathAchievementMethods inherited from class com.minecolonies.core.colony.jobs.AbstractJob
assignTo, canAIBeInterrupted, clearActionsDone, createAI, deserializeNBT, equals, getActionsDone, getAsyncRequests, getBuildingPos, getCitizen, getColony, getDiseaseModifier, getJobRegistryEntry, getNameTagDescription, getWorkBuilding, getWorkerAI, getWorkModule, hasCheckedForFoodToday, hashCode, incrementActionsDone, incrementActionsDone, isIdling, markRequestSync, onRemoval, onStackPickUp, onWakeUp, pickupSuccess, processOfflineTime, resetAI, serializeNBT, serializeToView, setCheckedForFood, setNameTag, setRegistryEntryMethods 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, triggerActivityChangeAction
-
Field Details
-
DESC
Desc of knight job.- See Also:
-
-
Constructor Details
-
JobKnight
Initialize citizen data.- Parameters:
entity- the citizen data.
-
-
Method Details
-
generateGuardAI
- Specified by:
generateGuardAIin classAbstractJobGuard<JobKnight>
-
onLevelUp
public void onLevelUp()Description copied from interface:IJobLevelup actions on citizen levelup, allows custom actions based on Jobs- Specified by:
onLevelUpin interfaceIJob<AbstractEntityAIGuard<JobKnight,? extends AbstractBuildingGuards>>
-
getModel
public 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<AbstractEntityAIGuard<JobKnight,? extends AbstractBuildingGuards>> - Overrides:
getModelin classAbstractJob<AbstractEntityAIGuard<JobKnight,? extends AbstractBuildingGuards>, JobKnight> - Returns:
- Model of the citizen.
-
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<AbstractEntityAIGuard<JobKnight,? extends AbstractBuildingGuards>> - Overrides:
ignoresDamagein classAbstractJob<AbstractEntityAIGuard<JobKnight,? extends AbstractBuildingGuards>, JobKnight> - Parameters:
damageSource- the damage source to check.- Returns:
- true if so.
-
onColonyFlagChanged
public void onColonyFlagChanged()Description copied from interface:IJobWithColonyFlagWhat to do when the colony flag changes.- Specified by:
onColonyFlagChangedin interfaceIJobWithColonyFlag
-