Class JobNetherWorker

All Implemented Interfaces:
IJob<EntityAIWorkNether>, net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class JobNetherWorker extends AbstractJobCrafter<EntityAIWorkNether,JobNetherWorker>
  • Constructor Details

    • JobNetherWorker

      public JobNetherWorker(ICitizenData entity)
  • Method Details

    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      serializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Overrides:
      serializeNBT in class AbstractJobCrafter<EntityAIWorkNether,JobNetherWorker>
    • deserializeNBT

      public void deserializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound)
      Specified by:
      deserializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Overrides:
      deserializeNBT in class AbstractJobCrafter<EntityAIWorkNether,JobNetherWorker>
    • generateAI

      public EntityAIWorkNether generateAI()
      Description copied from interface: IJob
      Generate 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: IJob
      Get the RenderBipedCitizen.Model to use when the Citizen performs this job role.
      Specified by:
      getModel in interface IJob<EntityAIWorkNether>
      Overrides:
      getModel in class AbstractJobCrafter<EntityAIWorkNether,JobNetherWorker>
      Returns:
      Model of the citizen.
    • getDiseaseModifier

      public double getDiseaseModifier()
      Description copied from interface: IJob
      Disease modifier of the job.
      Specified by:
      getDiseaseModifier in interface IJob<EntityAIWorkNether>
      Overrides:
      getDiseaseModifier in class AbstractJob<EntityAIWorkNether,JobNetherWorker>
      Returns:
      the modifier of the job.
    • getIdleSeverity

      public int getIdleSeverity(boolean isDemand)
      Description copied from interface: IJob
      Get 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

      public Queue<net.minecraft.world.item.ItemStack> getCraftedResults()
      Get the queue of CraftedResults This queue is not immutable and OK to modify
    • addCraftedResultsList

      public boolean addCraftedResultsList(Collection<net.minecraft.world.item.ItemStack> newResults)
      Add a list of items to the crafted results list
      Parameters:
      newResults - items to add
      Returns:
      true if success
    • getProcessedResults

      public Queue<net.minecraft.world.item.ItemStack> getProcessedResults()
      Get the queue of ProcessedResults This queue is not immutable and OK to modify
    • addProcessedResultsList

      public boolean addProcessedResultsList(Collection<net.minecraft.world.item.ItemStack> newResults)
      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: IJob
      Check if the particular job ignores a particular damage type.
      Specified by:
      ignoresDamage in interface IJob<EntityAIWorkNether>
      Overrides:
      ignoresDamage in class AbstractJob<EntityAIWorkNether,JobNetherWorker>
      Parameters:
      damageSource - the damage source to check.
      Returns:
      true if so.