ItemStackRequestExecutor
Methods
__construct()
php
public function __construct(\pocketmine\player\Player $player, \pocketmine\network\mcpe\InventoryManager $inventoryManager, \pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequest $request)addItemToSlot() protected
php
protected function addItemToSlot(\pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestSlotInfo $slotInfo, \pocketmine\item\Item $item, int $count) : voidAdds items to the target slot, if they are stackable.
beginBeaconPayment() 5.46.0 protected
php
protected function beginBeaconPayment(int $primaryEffectId, int $secondaryEffectId) : voidChoosing the powers of a beacon. The client follows this action with a Destroy of the payment slot (dragonfly, PowerNukkitX); if it doesn't, consumeBeaconPayment() takes the payment anyway.
beginCartography() 5.46.0 protected
php
protected function beginCartography(\pocketmine\block\inventory\CartographyTableInventory $window, \pocketmine\crafting\CartographyMapRecipe $recipe) : voidMap operations of the cartography table (zoom out, clone, add markers, lock): the result depends on the map in the table, not on a crafting grid.
beginCrafting() protected
php
protected function beginCrafting(int $recipeId, int $repetitions) : voidbeginTrade() 5.46.0 protected
php
protected function beginTrade(\pocketmine\inventory\TradeInventory $window, int $networkId, int $repetitions) : voidA trade with a villager or wandering trader: the recipe ID is the trade's network ID (see \pocketmine\entity\npc\TradeOffer); the payment is consumed from the trade slots by later actions and TradeTransaction checks it.
buildItemStackResponse()
php
public function buildItemStackResponse() : \pocketmine\network\mcpe\protocol\types\inventory\stackresponse\ItemStackResponsedropItem() protected
php
protected function dropItem(\pocketmine\item\Item $item, int $count) : voidgenerateInventoryTransaction()
php
public function generateInventoryTransaction() : ?\pocketmine\inventory\transaction\InventoryTransactiongetBuilderInventoryAndSlot() protected
php
protected function getBuilderInventoryAndSlot(\pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestSlotInfo $info) : arraygetItemStackResponseBuilder()
php
public function getItemStackResponseBuilder() : \pocketmine\network\mcpe\handler\ItemStackResponseBuilderprettyInventoryAndSlot() protected
php
protected function prettyInventoryAndSlot(\pocketmine\inventory\Inventory $inventory, int $slot) : stringprocessItemStackRequestAction() protected
php
protected function processItemStackRequestAction(\pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestAction $action) : voidremoveItemFromSlot() protected
php
protected function removeItemFromSlot(\pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestSlotInfo $slotInfo, int $count) : \pocketmine\item\ItemDeducts items from an inventory slot, returning a stack containing the removed items.
setNextCreatedItem() protected
php
protected function setNextCreatedItem(?\pocketmine\item\Item $item, bool $creative = false) : voidtakeCreatedItem() protected
php
protected function takeCreatedItem(int $count) : \pocketmine\item\ItemtransferItems() protected
php
protected function transferItems(\pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestSlotInfo $source, \pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestSlotInfo $destination, int $count) : void