接口 Steerable

所有超级接口:
Ageable, Animals, Attributable, Breedable, CommandSender, Creature, Damageable, Entity, Leashable, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator
所有已知子接口:
Pig, Strider

public interface Steerable extends Animals
代表一个可以装鞍、骑乘并使用物品操控的实体。
  • 方法详细资料

    • hasSaddle

      boolean hasSaddle()
      检查猪是否有鞍。

      原文:Check if the pig has a saddle.

      返回:
      猪是否已装鞍
    • setSaddle

      void setSaddle(boolean saddled)
      设置猪是否有鞍。

      原文:Sets if the pig has a saddle or not

      参数:
      saddled - 设置猪是否有鞍
    • getBoostTicks

      int getBoostTicks()
      获取此实体移动速度提升的时间(以tick为单位)。

      移动速度提升通常是由于使用 getSteerMaterial() 导致的。

      原文:Get the time in ticks this entity's movement is being increased.

      Movement speed is often increased as a result of using the getSteerMaterial().

      返回:
      当前加速tick数
    • setBoostTicks

      void setBoostTicks(int ticks)
      设置此实体移动速度提升的时间(以tick为单位)。

      这将把当前加速tick数重置为0(getCurrentBoostTicks())。

      原文:Set the time in ticks this entity's movement will be increased.

      This will reset the current boost ticks to 0 (getCurrentBoostTicks()).

      参数:
      ticks - 加速时间
    • getCurrentBoostTicks

      int getCurrentBoostTicks()
      获取此实体自最近一次加速以来移动速度提升的时间(以tick为单位)。

      当前加速tick数永远不会 > getBoostTicks()。

      原文: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().

      返回:
      当前加速tick数
    • setCurrentBoostTicks

      void setCurrentBoostTicks(int ticks)
      设置此实体自最近一次加速以来移动速度提升的时间(以tick为单位)。

      原文:Set the time in ticks this entity's movement has been increased relative to the most recent boost.

      参数:
      ticks - 当前加速tick数。必须 >= 0 且 <= getBoostTicks()
    • getSteerMaterial

      @NotNull @NotNull Material getSteerMaterial()
      获取玩家骑乘此实体时用于操控的物品材料。

      原文:Get the material used to steer this entity when ridden by a player.

      返回:
      引诱材料