PocketMine-MP 5.42.1 git-d77520d210fcb967a02bc11817ad625393c8ebc6
Loading...
Searching...
No Matches
pocketmine\network\mcpe\handler\ItemStackRequestExecutor Class Reference
+ Collaboration diagram for pocketmine\network\mcpe\handler\ItemStackRequestExecutor:

Public Member Functions

 __construct (private Player $player, private InventoryManager $inventoryManager, private ItemStackRequest $request)
 
 buildItemStackResponse ()
 
 generateInventoryTransaction ()
 
 getItemStackResponseBuilder ()
 

Protected Member Functions

 addItemToSlot (ItemStackRequestSlotInfo $slotInfo, Item $item, int $count)
 
 beginCrafting (int $recipeId, int $repetitions)
 
 dropItem (Item $item, int $count)
 
 getBuilderInventoryAndSlot (ItemStackRequestSlotInfo $info)
 
 prettyInventoryAndSlot (Inventory $inventory, int $slot)
 
 processItemStackRequestAction (ItemStackRequestAction $action)
 
 removeItemFromSlot (ItemStackRequestSlotInfo $slotInfo, int $count)
 
 setNextCreatedItem (?Item $item, bool $creative=false)
 
 takeCreatedItem (int $count)
 
 transferItems (ItemStackRequestSlotInfo $source, ItemStackRequestSlotInfo $destination, int $count)
 

Detailed Description

Definition at line 66 of file ItemStackRequestExecutor.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::__construct ( private Player $player,
private InventoryManager $inventoryManager,
private ItemStackRequest $request )

Definition at line 81 of file ItemStackRequestExecutor.php.

Member Function Documentation

◆ addItemToSlot()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::addItemToSlot ( ItemStackRequestSlotInfo $slotInfo,
Item $item,
int $count )
protected

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

Exceptions
ItemStackRequestProcessException

Definition at line 177 of file ItemStackRequestExecutor.php.

◆ beginCrafting()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::beginCrafting ( int $recipeId,
int $repetitions )
protected
Exceptions
ItemStackRequestProcessException

Definition at line 228 of file ItemStackRequestExecutor.php.

◆ buildItemStackResponse()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::buildItemStackResponse ( )

Definition at line 419 of file ItemStackRequestExecutor.php.

◆ dropItem()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::dropItem ( Item $item,
int $count )
protected

Definition at line 196 of file ItemStackRequestExecutor.php.

◆ generateInventoryTransaction()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::generateInventoryTransaction ( )
Exceptions
ItemStackRequestProcessException

Definition at line 388 of file ItemStackRequestExecutor.php.

◆ getBuilderInventoryAndSlot()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::getBuilderInventoryAndSlot ( ItemStackRequestSlotInfo $info)
protected

@phpstan-return array{TransactionBuilderInventory, int}

Exceptions
ItemStackRequestProcessException

Definition at line 119 of file ItemStackRequestExecutor.php.

◆ getItemStackResponseBuilder()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::getItemStackResponseBuilder ( )

Definition at line 410 of file ItemStackRequestExecutor.php.

◆ prettyInventoryAndSlot()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::prettyInventoryAndSlot ( Inventory $inventory,
int $slot )
protected

Definition at line 89 of file ItemStackRequestExecutor.php.

◆ processItemStackRequestAction()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::processItemStackRequestAction ( ItemStackRequestAction $action)
protected
Exceptions
ItemStackRequestProcessException

Definition at line 310 of file ItemStackRequestExecutor.php.

◆ removeItemFromSlot()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::removeItemFromSlot ( ItemStackRequestSlotInfo $slotInfo,
int $count )
protected

Deducts items from an inventory slot, returning a stack containing the removed items.

Exceptions
ItemStackRequestProcessException

Definition at line 149 of file ItemStackRequestExecutor.php.

◆ setNextCreatedItem()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::setNextCreatedItem ( ?Item $item,
bool $creative = false )
protected
Exceptions
ItemStackRequestProcessException

Definition at line 206 of file ItemStackRequestExecutor.php.

◆ takeCreatedItem()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::takeCreatedItem ( int $count)
protected
Exceptions
ItemStackRequestProcessException

Definition at line 268 of file ItemStackRequestExecutor.php.

◆ transferItems()

pocketmine\network\mcpe\handler\ItemStackRequestExecutor::transferItems ( ItemStackRequestSlotInfo $source,
ItemStackRequestSlotInfo $destination,
int $count )
protected
Exceptions
ItemStackRequestProcessException

Definition at line 140 of file ItemStackRequestExecutor.php.


The documentation for this class was generated from the following file: