Class JobQuarrier
java.lang.Object
com.minecolonies.core.colony.jobs.AbstractJob<EntityAIQuarrier,JobQuarrier>
com.minecolonies.core.colony.jobs.AbstractJobStructure<EntityAIQuarrier,JobQuarrier>
com.minecolonies.core.colony.jobs.JobQuarrier
- All Implemented Interfaces:
IJob<EntityAIQuarrier>,IJobWithExternalWorkStations,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
public class JobQuarrier
extends AbstractJobStructure<EntityAIQuarrier,JobQuarrier>
implements IJobWithExternalWorkStations
Special quarrier 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 TypeMethodDescriptionbooleanassignTo(IAssignsJob module) Assigns the job to its specific work moduleFinds the quarry our miner is assigned to@NotNull EntityAIQuarrierGenerate 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.Get a list of potential external workstations.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, 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
-
JobQuarrier
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<EntityAIQuarrier>- Overrides:
getModelin classAbstractJob<EntityAIQuarrier,JobQuarrier> - Returns:
- Model of the citizen.
-
generateAI
Generate your AI class to register.- Specified by:
generateAIin interfaceIJob<EntityAIQuarrier>- Returns:
- your personal AI instance.
-
getDiseaseModifier
public double getDiseaseModifier()Description copied from interface:IJobDisease modifier of the job.- Specified by:
getDiseaseModifierin interfaceIJob<EntityAIQuarrier>- Overrides:
getDiseaseModifierin classAbstractJob<EntityAIQuarrier,JobQuarrier> - Returns:
- the modifier of the job.
-
findQuarry
Finds the quarry our miner is assigned to- Returns:
- quarry building or null
-
assignTo
Description copied from interface:IJobAssigns the job to its specific work module- Specified by:
assignToin interfaceIJob<EntityAIQuarrier>- Overrides:
assignToin classAbstractJob<EntityAIQuarrier,JobQuarrier> - Parameters:
module-- Returns:
-
getWorkStations
Description copied from interface:IJobWithExternalWorkStationsGet a list of potential external workstations.- Specified by:
getWorkStationsin interfaceIJobWithExternalWorkStations- Returns:
- list of stations the citizen is working at.
-
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<EntityAIQuarrier>- Overrides:
ignoresDamagein classAbstractJob<EntityAIQuarrier,JobQuarrier> - Parameters:
damageSource- the damage source to check.- Returns:
- true if so.
-
getSaturationFactor
public double getSaturationFactor()Description copied from interface:IJobJob saturation factor.- Specified by:
getSaturationFactorin interfaceIJob<EntityAIQuarrier>- Returns:
- increase in saturation consumption based on job.
-