Skip to content

MountInventoryHolder 5.46.0 ​

interface · pocketmine\entity\riding\MountInventoryHolder · source

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) : bool

Returns whether the item may be put in the given slot of the inventory.

canOpenInventory() ​

php
public function canOpenInventory(\pocketmine\player\Player $player) : bool

Whether the player may open the inventory now.

canWearSaddle() ​

php
public function canWearSaddle() : bool

Whether slot 0 is a saddle slot.

getArmorSlotIcon() ​

php
public function getArmorSlotIcon() : string

Returns the network name of the item shown in the empty armor slot of the horse screen.

getArmorSlotItemNames() ​

php
public function getArmorSlotItemNames() : array

Returns the network names of the items accepted in the armor slot, for the horse screen.

getId() ​

php
public function getId() : int

getInventory() ​

php
public function getInventory() : \pocketmine\inventory\HorseInventory

getName() ​

php
public function getName() : string

hasArmorSlot() ​

php
public function hasArmorSlot() : bool

Whether slot 1 is a body armor slot.

openInventory() ​

php
public function openInventory(\pocketmine\player\Player $player) : bool

Opens the inventory to the player. Returns whether it opened.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.