Class JobResearch

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

public class JobResearch extends AbstractJob<EntityAIWorkResearcher,JobResearch>
Job class of the researcher.
  • Constructor Details

    • JobResearch

      public JobResearch(ICitizenData entity)
      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: IJob
      Get the RenderBipedCitizen.Model to use when the Citizen performs this job role.
      Specified by:
      getModel in interface IJob<EntityAIWorkResearcher>
      Overrides:
      getModel in class AbstractJob<EntityAIWorkResearcher,JobResearch>
      Returns:
      Model of the citizen.
    • generateAI

      @NotNull public @NotNull EntityAIWorkResearcher 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: IJob
      Process time the colony was offline.
      Specified by:
      processOfflineTime in interface IJob<EntityAIWorkResearcher>
      Overrides:
      processOfflineTime in class AbstractJob<EntityAIWorkResearcher,JobResearch>
      Parameters:
      time - the time in seconds.
    • 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 AbstractJob<EntityAIWorkResearcher,JobResearch>
    • 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 AbstractJob<EntityAIWorkResearcher,JobResearch>
    • reduceCurrentMana

      public void reduceCurrentMana()
      Reduce the current mana by one.