Interface Raider

All Superinterfaces:
Attributable, CommandSender, Creature, Damageable, Enemy, Entity, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator
All Known Subinterfaces:
Evoker, Illager, Illusioner, Pillager, Ravager, Spellcaster, Vindicator, Witch

public interface Raider extends Monster
  • Method Details Link icon

    • setRaid Link icon

      void setRaid(@Nullable Raid raid)
      Set the Raid that this raider is participating in.
      Parameters:
      raid - the raid to set
    • getRaid Link icon

      @Nullable Raid getRaid()
      Get the Raid that this raider is participating in, if any.
      Returns:
      the raid, or null if not participating in a raid
    • getWave Link icon

      int getWave()
      Get the raid wave that this raider spawned as part of.
      Returns:
      the raid wave, or 0 if not participating in a raid
    • setWave Link icon

      void setWave(int wave)
      Set the raid wave that this raider was spawned as part of.
      Parameters:
      wave - the raid wave to set. Must be >= 0
    • getPatrolTarget Link icon

      @Nullable Block getPatrolTarget()
      Gets the block the raider is targeting to patrol.
      Returns:
      target block or null
    • setPatrolTarget Link icon

      void setPatrolTarget(@Nullable Block block)
      Sets the block the raider is targeting to patrol.
      Parameters:
      block - target block or null. Must be in same world as the entity
    • isPatrolLeader Link icon

      boolean isPatrolLeader()
      Gets whether this entity is a patrol leader.
      Returns:
      patrol leader status
    • setPatrolLeader Link icon

      void setPatrolLeader(boolean leader)
      Sets whether this entity is a patrol leader.
      Parameters:
      leader - patrol leader status
    • isCanJoinRaid Link icon

      boolean isCanJoinRaid()
      Gets whether this mob can join an active raid.
      Returns:
      CanJoinRaid status
    • setCanJoinRaid Link icon

      void setCanJoinRaid(boolean join)
      Sets whether this mob can join an active raid.
      Parameters:
      join - CanJoinRaid status
    • getTicksOutsideRaid Link icon

      int getTicksOutsideRaid()
      Get the amount of ticks that this mob has exited the bounds of a village as a raid participant.

      This value is increased only when the mob has had no action for 2,400 ticks (according to LivingEntity.getNoActionTicks()). Once both the no action ticks have reached that value and the ticks outside a raid exceeds 30, the mob will be expelled from the raid.

      Returns:
      the ticks outside of a raid
    • setTicksOutsideRaid Link icon

      void setTicksOutsideRaid(int ticks)
      Set the amount of ticks that this mob has exited the bounds of a village as a raid participant.

      This value is considered only when the mob has had no action for 2,400 ticks (according to LivingEntity.getNoActionTicks()). Once both the no action ticks have reached that value and the ticks outside a raid exceeds 30, the mob will be expelled from the raid.

      Parameters:
      ticks - the ticks outside of a raid
    • isCelebrating Link icon

      boolean isCelebrating()
      Check whether or not this raider is celebrating a raid victory.
      Returns:
      true if celebrating, false otherwise
    • setCelebrating Link icon

      void setCelebrating(boolean celebrating)
      Set whether or not this mob is celebrating a raid victory.
      Parameters:
      celebrating - whether or not to celebrate
    • getCelebrationSound Link icon

      @NotNull Sound getCelebrationSound()
      Get the Sound this entity will play when celebrating.
      Returns:
      the celebration sound