Class JobNetherWorker
java.lang.Object
com.minecolonies.core.colony.jobs.AbstractJob<AI,J>
com.minecolonies.core.colony.jobs.AbstractJobCrafter<EntityAIWorkNether,JobNetherWorker>
com.minecolonies.core.colony.jobs.JobNetherWorker
- All Implemented Interfaces:
IJob<EntityAIWorkNether>,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.jobs.AbstractJob
workBuilding, workBuildingPos, workModule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddCraftedResultsList(Collection<net.minecraft.world.item.ItemStack> newResults) Add a list of items to the crafted results listbooleanaddProcessedResultsList(Collection<net.minecraft.world.item.ItemStack> newResults) Add a list of items to the processed results listvoiddeserializeNBT(net.minecraft.nbt.CompoundTag compound) Generate your AI class to register.Queue<net.minecraft.world.item.ItemStack>Get the queue of CraftedResults This queue is not immutable and OK to modifydoubleDisease modifier of the job.intgetIdleSeverity(boolean isDemand) Get the days before complaining or demanding solution for being idle@NotNull net.minecraft.resources.ResourceLocationgetModel()Get the RenderBipedCitizen.Model to use when the Citizen performs this job role.Queue<net.minecraft.world.item.ItemStack>Get the queue of ProcessedResults This queue is not immutable and OK to modifybooleanignoresDamage(@NotNull net.minecraft.world.damagesource.DamageSource damageSource) Check if the particular job ignores a particular damage type.booleanCheck if the citizen is in the nether currentlynet.minecraft.nbt.CompoundTagvoidsetInNether(boolean away) Mark the worker as in the nether or not.Methods inherited from class com.minecolonies.core.colony.jobs.AbstractJobCrafter
addRequest, finishRequest, getAssignedTasks, getAssignedTasksFromDataStore, getCraftCounter, getCurrentTask, getMaxCraftingCount, getProgress, getSecondaryOutputs, getTaskQueue, hasTask, onRemoval, onTaskBeingResolved, onTaskBeingScheduled, onTaskDeletion, playSound, serializeToView, setCraftCounter, setMaxCraftingCount, setProgressMethods 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, 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
getInactivityLimit, getSaturationFactor, initEntityValues, isGuard, onLevelUp, triggerActivityChangeAction
-
Constructor Details
-
JobNetherWorker
-
-
Method Details
-
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT()- Specified by:
serializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>- Overrides:
serializeNBTin classAbstractJobCrafter<EntityAIWorkNether,JobNetherWorker>
-
deserializeNBT
public void deserializeNBT(net.minecraft.nbt.CompoundTag compound) - Specified by:
deserializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>- Overrides:
deserializeNBTin classAbstractJobCrafter<EntityAIWorkNether,JobNetherWorker>
-
generateAI
Description copied from interface:IJobGenerate your AI class to register.Suppressing Sonar Rule squid:S1452 This rule does "Generic wildcard types should not be used in return parameters" But in this case the rule does not apply because We are fine with all AbstractJob implementations and need generics only for java
- Returns:
- your personal AI instance.
-
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<EntityAIWorkNether>- Overrides:
getModelin classAbstractJobCrafter<EntityAIWorkNether,JobNetherWorker> - Returns:
- Model of the citizen.
-
getDiseaseModifier
public double getDiseaseModifier()Description copied from interface:IJobDisease modifier of the job.- Specified by:
getDiseaseModifierin interfaceIJob<EntityAIWorkNether>- Overrides:
getDiseaseModifierin classAbstractJob<EntityAIWorkNether,JobNetherWorker> - Returns:
- the modifier of the job.
-
getIdleSeverity
public int getIdleSeverity(boolean isDemand) Description copied from interface:IJobGet the days before complaining or demanding solution for being idle- Parameters:
isDemand- true if looking for the demand time- Returns:
- number of days
-
setInNether
public void setInNether(boolean away) Mark the worker as in the nether or not.- Parameters:
away- true if in the nether
-
isInNether
public boolean isInNether()Check if the citizen is in the nether currently -
getCraftedResults
Get the queue of CraftedResults This queue is not immutable and OK to modify -
addCraftedResultsList
Add a list of items to the crafted results list- Parameters:
newResults- items to add- Returns:
- true if success
-
getProcessedResults
Get the queue of ProcessedResults This queue is not immutable and OK to modify -
addProcessedResultsList
Add a list of items to the processed results list- Parameters:
newResults- items to add- Returns:
- true if success
-
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<EntityAIWorkNether>- Overrides:
ignoresDamagein classAbstractJob<EntityAIWorkNether,JobNetherWorker> - Parameters:
damageSource- the damage source to check.- Returns:
- true if so.
-