Interface Steerable

All Superinterfaces:
Ageable, Animals, Attributable, Audience, Breedable, CommandSender, Creature, Damageable, Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter
All Known Subinterfaces:
Pig, Strider

public interface Steerable extends Animals
Represents an entity which may be saddled, ridden and steered using an item.
  • Method Details

    • hasSaddle

      boolean hasSaddle()
      Check if the pig has a saddle.
      Returns:
      if the pig has been saddled.
    • setSaddle

      void setSaddle(boolean saddled)
      Sets if the pig has a saddle or not
      Parameters:
      saddled - set if the pig has a saddle or not.
    • getBoostTicks

      int getBoostTicks()
      Get the time in ticks this entity's movement is being increased. Movement speed is often increased as a result of using the getSteerMaterial().
      Returns:
      the current boost ticks
    • setBoostTicks

      void setBoostTicks(int ticks)
      Set the time in ticks this entity's movement will be increased. This will reset the current boost ticks to 0 (getCurrentBoostTicks()).
      Parameters:
      ticks - the boost time
    • getCurrentBoostTicks

      int getCurrentBoostTicks()
      Get the time in ticks this entity's movement has been increased as of the most recent boost. Current boost ticks will never be > getBoostTicks().
      Returns:
      the current boost ticks
    • setCurrentBoostTicks

      void setCurrentBoostTicks(int ticks)
      Set the time in ticks this entity's movement has been increased relative to the most recent boost.
      Parameters:
      ticks - the current boost ticks. Must be >= 0 and <= getBoostTicks()
    • getSteerMaterial

      @NotNull @NotNull Material getSteerMaterial()
      Get the material used to steer this entity when ridden by a player.
      Returns:
      the lure material