Interface IBuildingWorker

All Superinterfaces:
IBuilding, IBuildingContainer, IBuildingModuleContainer, ICommonBuilding, IItemHandlerCapProvider, IModuleContainer<IBuildingModule>, net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>, IRequester, IRequestResolverProvider, ISchematicProvider

public interface IBuildingWorker extends IBuilding
  • Field Details

    • WOOD_HUT_LEVEL

      static final int WOOD_HUT_LEVEL
      Minimal level to ask for wood tools. (WOOD_HUT_LEVEL + 1 == stone)
      See Also:
  • Method Details

    • createJob

      @NotNull @NotNull IJob<?> createJob(ICitizenData citizen)
      The abstract method which creates a job for the building.
      Parameters:
      citizen - the citizen to take the job.
      Returns:
      the Job.
    • isItemStackInRequest

      boolean isItemStackInRequest(@Nullable @Nullable net.minecraft.world.item.ItemStack stack)
      Check if a certain ItemStack is in the request of a worker.
      Specified by:
      isItemStackInRequest in interface IBuilding
      Parameters:
      stack - the stack to chest.
      Returns:
      true if so.
    • setHiringMode

      void setHiringMode(HiringMode hiringMode)
      Set a new hiring mode in the building.
      Parameters:
      hiringMode - the mode to set.
    • getHiringMode

      HiringMode getHiringMode()
      Get the current hiring mode of this building.
      Returns:
      the current mode.
    • getHandlers

      List<net.neoforged.neoforge.items.IItemHandler> getHandlers()
      Get all handlers accociated with this building.
      Specified by:
      getHandlers in interface IBuilding
      Returns:
      the handlers of the building + citizen.
    • assignCitizen

      boolean assignCitizen(ICitizenData citizen)
    • getJobName

      @NotNull @NotNull String getJobName()
      The abstract method which returns the name of the job.
      Returns:
      the job name.
    • getMaxEquipmentLevel

      int getMaxEquipmentLevel()
      Get the max tool level useable by the worker.
      Specified by:
      getMaxEquipmentLevel in interface IBuilding
      Returns:
      the integer.
    • canWorkDuringTheRain

      boolean canWorkDuringTheRain()
      Method which defines if a worker should be allowed to work during the rain.
      Returns:
      true if so.
    • getPrimarySkill

      @NotNull @NotNull Skill getPrimarySkill()
      Primary skill getter.
      Returns:
      the primary skill.
    • getSecondarySkill

      @NotNull @NotNull Skill getSecondarySkill()
      Secondary skill getter.
      Returns:
      the secondary skill.
    • getRecipeImprovementSkill

      @NotNull @NotNull Skill getRecipeImprovementSkill()
      Recipe Improvement skill getter
      Returns:
      the recipe improvement skill
    • canEat

      boolean canEat(net.minecraft.world.item.ItemStack stack)
      Check if the worker is allowed to eat the following stack.
      Specified by:
      canEat in interface IBuilding
      Parameters:
      stack - the stack to test.
      Returns:
      true if so.