接口 ChestedHorse

所有超级接口:
AbstractHorse, Ageable, Animals, Attributable, Breedable, CommandSender, Creature, Damageable, Entity, InventoryHolder, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator, Tameable, Vehicle
所有已知子接口:
Donkey, Llama, Mule, TraderLlama

public interface ChestedHorse extends AbstractHorse
代表一个可以携带物品的类马生物. 译注: 就是有物品栏的由马衍生的生物, 例如驴、羊驼等.

原文: Represents Horse-like creatures which can carry an inventory.

  • 方法详细资料

    • isCarryingChest

      boolean isCarryingChest()
      获得此马是否有装备箱子.

      原文: Gets whether the horse has a chest equipped.

      返回:
      如果此马有存储空间返回true
    • setCarryingChest

      void setCarryingChest(boolean chest)
      设置此马是否装备箱子. 移除箱子将会清空箱子内所有物品.

      原文: Sets whether the horse has a chest equipped. Removing a chest will also clear the chest's inventory.

      参数:
      chest - 设置为true则此马将拥有箱子