Interface Raider

All Superinterfaces:
Attributable, Audience, CommandSender, Creature, Damageable, Enemy, Entity, Frictional, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter
All Known Subinterfaces:
Evoker, Illager, Illusioner, Pillager, Ravager, Spellcaster, Vindicator, Witch

public interface Raider extends Monster
  • Method Details

    • setRaid

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

      Get the Raid that this raider is participating in, if any.
      Returns:
      the raid, or null if not participating in a raid
    • getWave

      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

      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

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

      void setPatrolTarget(@Nullable @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

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

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

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

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

      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

      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

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

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

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