Skip to content

ItemStackRequestExecutor ​

class · pocketmine\network\mcpe\handler\ItemStackRequestExecutor · source

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

Adds items to the target slot, if they are stackable.

beginBeaconPayment() 5.46.0 protected ​

php
protected function beginBeaconPayment(int $primaryEffectId, int $secondaryEffectId) : void

Choosing 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) : void

Map 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) : void

beginTrade() 5.46.0 protected ​

php
protected function beginTrade(\pocketmine\inventory\TradeInventory $window, int $networkId, int $repetitions) : void

A 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\ItemStackResponse

dropItem() protected ​

php
protected function dropItem(\pocketmine\item\Item $item, int $count) : void

generateInventoryTransaction() ​

php
public function generateInventoryTransaction() : ?\pocketmine\inventory\transaction\InventoryTransaction

getBuilderInventoryAndSlot() protected ​

php
protected function getBuilderInventoryAndSlot(\pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestSlotInfo $info) : array

getItemStackResponseBuilder() ​

php
public function getItemStackResponseBuilder() : \pocketmine\network\mcpe\handler\ItemStackResponseBuilder

prettyInventoryAndSlot() protected ​

php
protected function prettyInventoryAndSlot(\pocketmine\inventory\Inventory $inventory, int $slot) : string

processItemStackRequestAction() protected ​

php
protected function processItemStackRequestAction(\pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestAction $action) : void

removeItemFromSlot() protected ​

php
protected function removeItemFromSlot(\pocketmine\network\mcpe\protocol\types\inventory\stackrequest\ItemStackRequestSlotInfo $slotInfo, int $count) : \pocketmine\item\Item

Deducts 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) : void

takeCreatedItem() protected ​

php
protected function takeCreatedItem(int $count) : \pocketmine\item\Item

transferItems() 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

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