接口 SkeletonHorse

所有超级接口:
AbstractHorse, Ageable, Animals, Attributable, Breedable, CommandSender, Creature, Damageable, Entity, InventoryHolder, Leashable, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator, Tameable, Vehicle

public interface SkeletonHorse extends AbstractHorse
代表骷髅马 - AbstractHorse 的变种。
  • 方法详细资料

    • isTrapped

      boolean isTrapped()
      返回此骷髅马是否被困住。

      当马被困住且玩家进入其10格范围内时,闪电会击中该马。 被击中后,骷髅陷阱将激活,将马变成骷髅骑手,并在附近生成三个额外的骑手。

      原文:Returns whether this skeleton horse is trapped.

      When a horse is trapped and a player comes within 10 blocks of a trapped horse, lightning will strike the horse. When struck, the skeleton trap will activate, turning the horse into a skeleton horseman as well as spawning three additional horsemen nearby.

      返回:
      如果被困住则为true
    • setTrapped

      void setTrapped(boolean trapped)
      设置此骷髅马是否被困住。

      原文:Sets if this skeleton horse is trapped.

      参数:
      trapped - 新的被困状态
    • getTrapTime

      int getTrapTime()
      返回马当前的陷阱时间(以tick为单位)。

      当 isTrapped() 为true时,陷阱时间每tick增加。 当达到18000 tick时,马将自动消失。

      原文:Returns the horse's current trap time in ticks.

      Trap time is incremented every tick when isTrapped() is true. The horse automatically despawns when it reaches 18000 ticks.

      返回:
      当前陷阱时间
    • setTrapTime

      void setTrapTime(int trapTime)
      设置马的陷阱时间。

      大于18000的值将导致马在下一个tick消失。

      原文:Sets the trap time for the horse.

      Values greater than 18000 will cause the horse to despawn on the next tick.

      参数:
      trapTime - 新的陷阱时间