Class JobResearch
java.lang.Object
com.minecolonies.core.colony.jobs.AbstractJob<EntityAIWorkResearcher,JobResearch>
com.minecolonies.core.colony.jobs.JobResearch
- All Implemented Interfaces:
IJob<EntityAIWorkResearcher>,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Job class of the researcher.
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.jobs.AbstractJob
workBuilding, workBuildingPos, workModule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserializeNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound) @NotNull EntityAIWorkResearcherOverride to add Job-specific AI tasks to the given EntityAITask list.intGet the current mana filling.@NotNull net.minecraft.resources.ResourceLocationgetModel()Get the RenderBipedCitizen.Model to use when the Citizen performs this job role.voidprocessOfflineTime(long time) Process time the colony was offline.voidReduce the current mana by one.net.minecraft.nbt.CompoundTagserializeNBT(net.minecraft.core.HolderLookup.Provider provider) Methods 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, ignoresDamage, incrementActionsDone, incrementActionsDone, isIdling, markRequestSync, onRemoval, onStackPickUp, onWakeUp, pickupSuccess, resetAI, 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, getSaturationFactor, initEntityValues, isGuard, onLevelUp, triggerActivityChangeAction
-
Constructor Details
-
JobResearch
Public constructor of the researcher job.- Parameters:
entity- the entity to assign to the job.
-
-
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<EntityAIWorkResearcher>- Overrides:
getModelin classAbstractJob<EntityAIWorkResearcher,JobResearch> - Returns:
- Model of the citizen.
-
generateAI
Override to add Job-specific AI tasks to the given EntityAITask list.- Returns:
- your personal AI instance.
-
getCurrentMana
public int getCurrentMana()Get the current mana filling.- Returns:
- the current quantity.
-
processOfflineTime
public void processOfflineTime(long time) Description copied from interface:IJobProcess time the colony was offline.- Specified by:
processOfflineTimein interfaceIJob<EntityAIWorkResearcher>- Overrides:
processOfflineTimein classAbstractJob<EntityAIWorkResearcher,JobResearch> - Parameters:
time- the time in seconds.
-
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider) - Specified by:
serializeNBTin interfacenet.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>- Overrides:
serializeNBTin classAbstractJob<EntityAIWorkResearcher,JobResearch>
-
deserializeNBT
public void deserializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound) - Specified by:
deserializeNBTin interfacenet.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>- Overrides:
deserializeNBTin classAbstractJob<EntityAIWorkResearcher,JobResearch>
-
reduceCurrentMana
public void reduceCurrentMana()Reduce the current mana by one.
-