接口 Raider

所有超级接口:
Attributable, CommandSender, Creature, Damageable, Enemy, Entity, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator
所有已知子接口:
Evoker, Illager, Illusioner, Pillager, Ravager, Spellcaster, Vindicator, Witch

public interface Raider extends Monster
  • 方法详细资料

    • setRaid

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

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

      int getWave()
      Get the raid wave that this raider spawned as part of.
      返回:
      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.
      参数:
      wave - the raid wave to set. Must be >= 0
    • getPatrolTarget

      @Nullable @Nullable Block getPatrolTarget()
      获取袭击者要巡逻的目标方块.

      原文:Gets the block the raider is targeting to patrol.

      返回:
      目标方块或null
    • setPatrolTarget

      void setPatrolTarget(@Nullable @Nullable Block block)
      设置袭击者要巡逻的目标方块.

      原文:Sets the block the raider is targeting to patrol.

      参数:
      block - 目标方块或null, 此方块所处位置必须与此生物位于同一世界
    • isPatrolLeader

      boolean isPatrolLeader()
      判断此实体是否为灾厄巡逻队队长(袭击队长).

      原文:Gets whether this entity is a patrol leader.

      返回:
      此实体是否为袭击队长
    • setPatrolLeader

      void setPatrolLeader(boolean leader)
      设置此实体是否为袭击队长.

      原文:Sets whether this entity is a patrol leader.

      参数:
      leader - 是否为袭击队长
    • isCanJoinRaid

      boolean isCanJoinRaid()
      获取此生物能否参与一个活跃的袭击.

      原文:Gets whether this mob can join an active raid.

      返回:
      能否参与一个活跃的袭击
    • setCanJoinRaid

      void setCanJoinRaid(boolean join)
      设置此生物能否参与一个活跃的袭击.

      原文:Sets whether this mob can join an active raid.

      参数:
      join - 能否参与一个活跃的袭击
    • 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.

      返回:
      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.

      参数:
      ticks - the ticks outside of a raid
    • isCelebrating

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

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

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