Interface SkeletonHorse

All Superinterfaces:
AbstractHorse, Ageable, Animals, Attributable, Audience, Breedable, CommandSender, Creature, Damageable, Entity, HoverEventSource<HoverEvent.ShowEntity>, InventoryHolder, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter, Tameable, Vehicle

public interface SkeletonHorse extends AbstractHorse
Represents a SkeletonHorse - variant of AbstractHorse.
  • Method Details

    • isTrapped

      boolean isTrapped()
      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.

      Returns:
      true if trapped
    • setTrapped

      void setTrapped(boolean trapped)
      Sets if this skeleton horse is trapped.
      Parameters:
      trapped - new trapped state
    • getTrapTime

      int getTrapTime()
      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.
      Returns:
      current trap time
    • setTrapTime

      void setTrapTime(int trapTime)
      Sets the trap time for the horse. Values greater than 18000 will cause the horse to despawn on the next tick.
      Parameters:
      trapTime - new trap time
    • isTrap

      @Deprecated boolean isTrap()
      Deprecated.
    • setTrap

      @Deprecated void setTrap(boolean trap)
      Deprecated.