Class JobMiner
java.lang.Object
com.minecolonies.core.colony.jobs.AbstractJob<AI,J>
com.minecolonies.core.colony.jobs.AbstractJobStructure<EntityAIStructureMiner,JobMiner>
com.minecolonies.core.colony.jobs.JobMiner
- All Implemented Interfaces:
IJob<EntityAIStructureMiner>,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Special miner job. Defines miner model and specialized job behaviour.
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.jobs.AbstractJobStructure
TAG_WORK_ORDERFields inherited from class com.minecolonies.core.colony.jobs.AbstractJob
workBuilding, workBuildingPos, workModule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull EntityAIStructureMinerGenerate your AI class to register.doubleDisease modifier of the job.@NotNull net.minecraft.resources.ResourceLocationgetModel()Get the RenderBipedCitizen.Model to use when the Citizen performs this job role.doubleJob saturation factor.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.AbstractJobStructure
deserializeNBTMethods inherited from class com.minecolonies.core.colony.jobs.AbstractJob
allowsAvoidance, assignTo, canAIBeInterrupted, clearActionsDone, createAI, equals, getActionsDone, getAsyncRequests, getBuildingPos, getCitizen, getColony, getJobRegistryEntry, getNameTagDescription, getWorkBuilding, getWorkerAI, getWorkModule, hasCheckedForFoodToday, hashCode, incrementActionsDone, incrementActionsDone, isIdling, markRequestSync, onRemoval, onStackPickUp, onWakeUp, pickupSuccess, processOfflineTime, resetAI, serializeNBT, serializeToView, 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, initEntityValues, isGuard, onLevelUp, triggerActivityChangeAction
-
Constructor Details
-
JobMiner
Creates a new instance of the miner job.- Parameters:
entity- the entity to add the job to.
-
-
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<EntityAIStructureMiner>- Overrides:
getModelin classAbstractJob<EntityAIStructureMiner,JobMiner> - Returns:
- Model of the citizen.
-
generateAI
Generate your AI class to register.- Returns:
- your personal AI instance.
-
getDiseaseModifier
public double getDiseaseModifier()Description copied from interface:IJobDisease modifier of the job.- Specified by:
getDiseaseModifierin interfaceIJob<EntityAIStructureMiner>- Overrides:
getDiseaseModifierin classAbstractJob<EntityAIStructureMiner,JobMiner> - Returns:
- the modifier of the job.
-
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<EntityAIStructureMiner>- Overrides:
ignoresDamagein classAbstractJob<EntityAIStructureMiner,JobMiner> - Parameters:
damageSource- the damage source to check.- Returns:
- true if so.
-
getSaturationFactor
public double getSaturationFactor()Description copied from interface:IJobJob saturation factor.- Returns:
- increase in saturation consumption based on job.
-