Class GuardType

java.lang.Object
com.minecolonies.api.colony.guardtype.GuardType

public class GuardType extends Object
Guard type class.
  • Constructor Details

    • GuardType

      public GuardType(Supplier<JobEntry> jobEntry, String jobTranslationKey, String buttonTranslationKey, Skill primarySkill, Skill secondarySkill, String workerSoundName, Class<IJob<?>> clazz, net.minecraft.resources.ResourceLocation registryName)
      Constructor to create the type.
      Parameters:
      jobEntry - the job entry..
      jobTranslationKey - job translation key.
      buttonTranslationKey - button translation ky.
      primarySkill - primary skill.
      secondarySkill - secondary skill.
      workerSoundName - worker sound name.
      clazz - the class of the job.
  • Method Details

    • getJobEntry

      public Supplier<JobEntry> getJobEntry()
      Getter for the job producer.
      Returns:
      the producer.
    • getJobTranslationKey

      public String getJobTranslationKey()
      Getter for the job translation key.
      Returns:
      the key.
    • getButtonTranslationKey

      public String getButtonTranslationKey()
      Getter for the button translation key.
      Returns:
      the key.
    • getPrimarySkill

      public Skill getPrimarySkill()
      Getter for the primary key.
      Returns:
      the skill.
    • getSecondarySkill

      public Skill getSecondarySkill()
      Getter for the secondary skill.
      Returns:
      the skill.
    • getWorkerSoundName

      public String getWorkerSoundName()
      Getter for the worker sound name.
      Returns:
      the sound name.
    • isInstance

      public boolean isInstance(IJob<?> job)
      Check if the job is of this type.
      Parameters:
      job - the job to check.
      Returns:
      true if so.