MountInventoryHolder 5.46.0
A mount with a vanilla "horse" container (minecraft:inventory container_type horse): horses, donkeys, llamas, nautilus and zombie nautilus. Its HorseInventory is opened with the horse screen (sneak-interacting, or the inventory button of its rider): slot 0 is the saddle (or a llama's carpet), slot 1 the body armor.
Methods
canHoldInSlot()
php
public function canHoldInSlot(int $slot, \pocketmine\item\Item $item) : boolReturns whether the item may be put in the given slot of the inventory.
canOpenInventory()
php
public function canOpenInventory(\pocketmine\player\Player $player) : boolWhether the player may open the inventory now.
canWearSaddle()
php
public function canWearSaddle() : boolWhether slot 0 is a saddle slot.
getArmorSlotIcon()
php
public function getArmorSlotIcon() : stringReturns the network name of the item shown in the empty armor slot of the horse screen.
getArmorSlotItemNames()
php
public function getArmorSlotItemNames() : arrayReturns the network names of the items accepted in the armor slot, for the horse screen.
getId()
php
public function getId() : intgetInventory()
php
public function getInventory() : \pocketmine\inventory\HorseInventorygetName()
php
public function getName() : stringhasArmorSlot()
php
public function hasArmorSlot() : boolWhether slot 1 is a body armor slot.
openInventory()
php
public function openInventory(\pocketmine\player\Player $player) : boolOpens the inventory to the player. Returns whether it opened.
