PocketMine-MP 5.35.1 git-e32e836dad793a3a3c8ddd8927c00e112b1e576a
Loading...
Searching...
No Matches
pocketmine\network\mcpe\InventoryManager Class Reference
+ Inheritance diagram for pocketmine\network\mcpe\InventoryManager:
+ Collaboration diagram for pocketmine\network\mcpe\InventoryManager:

Public Member Functions

 __construct (private Player $player, private NetworkSession $session)
 
 addPredictedSlotChange (InventoryWindow $window, int $slot, Item $item)
 
 addRawPredictedSlotChanges (array $networkInventoryActions)
 
 addTransactionPredictedSlotChanges (InventoryTransaction $tx)
 
 flushPendingUpdates ()
 
 getContainerOpenCallbacks ()
 
 getCurrentWindowId ()
 
 getEnchantingTableOptionIndex (int $recipeId)
 
 getInventoryWindow (Inventory $inventory)
 
 getItemStackInfo (InventoryWindow $window, int $slot)
 
 getWindowId (InventoryWindow $window)
 
 locateWindowAndSlot (int $windowId, int $netSlotId)
 
 onClientOpenMainInventory ()
 
 onClientRemoveWindow (int $id)
 
 onClientSelectHotbarSlot (int $slot)
 
 onContentChange (Inventory $inventory, array $oldContents)
 
 onCurrentWindowChange (InventoryWindow $window)
 
 onCurrentWindowRemove ()
 
 onSlotChange (Inventory $inventory, int $slot, Item $oldItem)
 
 requestSyncAll ()
 
 requestSyncSlot (InventoryWindow $window, int $slot)
 
 setCurrentItemStackRequestId (?int $id)
 
 syncAll ()
 
 syncCreative ()
 
 syncData (Inventory $inventory, int $propertyId, int $value)
 
 syncEnchantingTableOptions (array $options)
 
 syncMismatchedPredictedSlotChanges ()
 
 syncSelectedHotbarSlot ()
 

Static Protected Member Functions

static createContainerOpen (int $id, InventoryWindow $window)
 

Detailed Description

@phpstan-type ContainerOpenClosure \Closure(int $id, InventoryWindow $window) : (list<ClientboundPacket>|null)

Definition at line 86 of file InventoryManager.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\network\mcpe\InventoryManager::__construct ( private Player $player,
private NetworkSession $session )

Definition at line 127 of file InventoryManager.php.

Member Function Documentation

◆ addPredictedSlotChange()

pocketmine\network\mcpe\InventoryManager::addPredictedSlotChange ( InventoryWindow $window,
int $slot,
Item $item )

Definition at line 265 of file InventoryManager.php.

◆ addRawPredictedSlotChanges()

pocketmine\network\mcpe\InventoryManager::addRawPredictedSlotChanges ( array $networkInventoryActions)
Parameters
NetworkInventoryAction[]$networkInventoryActions
Exceptions
PacketHandlingException

Definition at line 288 of file InventoryManager.php.

◆ addTransactionPredictedSlotChanges()

pocketmine\network\mcpe\InventoryManager::addTransactionPredictedSlotChanges ( InventoryTransaction $tx)

Definition at line 271 of file InventoryManager.php.

◆ createContainerOpen()

static pocketmine\network\mcpe\InventoryManager::createContainerOpen ( int $id,
InventoryWindow $window )
staticprotected
Returns
ClientboundPacket[]|null @phpstan-return list<ClientboundPacket>|null

Definition at line 394 of file InventoryManager.php.

◆ flushPendingUpdates()

pocketmine\network\mcpe\InventoryManager::flushPendingUpdates ( )

Definition at line 702 of file InventoryManager.php.

◆ getContainerOpenCallbacks()

pocketmine\network\mcpe\InventoryManager::getContainerOpenCallbacks ( )

@phpstan-return ObjectSet<ContainerOpenClosure>

Definition at line 388 of file InventoryManager.php.

◆ getCurrentWindowId()

pocketmine\network\mcpe\InventoryManager::getCurrentWindowId ( )

Definition at line 235 of file InventoryManager.php.

◆ getEnchantingTableOptionIndex()

pocketmine\network\mcpe\InventoryManager::getEnchantingTableOptionIndex ( int $recipeId)

Definition at line 794 of file InventoryManager.php.

◆ getInventoryWindow()

pocketmine\network\mcpe\InventoryManager::getInventoryWindow ( Inventory $inventory)

Definition at line 165 of file InventoryManager.php.

◆ getItemStackInfo()

pocketmine\network\mcpe\InventoryManager::getItemStackInfo ( InventoryWindow $window,
int $slot )

Definition at line 802 of file InventoryManager.php.

◆ getWindowId()

pocketmine\network\mcpe\InventoryManager::getWindowId ( InventoryWindow $window)

Definition at line 231 of file InventoryManager.php.

◆ locateWindowAndSlot()

pocketmine\network\mcpe\InventoryManager::locateWindowAndSlot ( int $windowId,
int $netSlotId )

@phpstan-return array{InventoryWindow, int}|null

Definition at line 242 of file InventoryManager.php.

◆ onClientOpenMainInventory()

pocketmine\network\mcpe\InventoryManager::onClientOpenMainInventory ( )

Definition at line 422 of file InventoryManager.php.

◆ onClientRemoveWindow()

pocketmine\network\mcpe\InventoryManager::onClientRemoveWindow ( int $id)

Definition at line 451 of file InventoryManager.php.

◆ onClientSelectHotbarSlot()

pocketmine\network\mcpe\InventoryManager::onClientSelectHotbarSlot ( int $slot)

Definition at line 735 of file InventoryManager.php.

◆ onContentChange()

pocketmine\network\mcpe\InventoryManager::onContentChange ( Inventory $inventory,
array $oldContents )
Parameters
Item[]$oldContents

Implements pocketmine\inventory\InventoryListener.

Definition at line 629 of file InventoryManager.php.

◆ onCurrentWindowChange()

pocketmine\network\mcpe\InventoryManager::onCurrentWindowChange ( InventoryWindow $window)

Definition at line 357 of file InventoryManager.php.

◆ onCurrentWindowRemove()

pocketmine\network\mcpe\InventoryManager::onCurrentWindowRemove ( )

Definition at line 439 of file InventoryManager.php.

◆ onSlotChange()

pocketmine\network\mcpe\InventoryManager::onSlotChange ( Inventory $inventory,
int $slot,
Item $oldItem )

Implements pocketmine\inventory\InventoryListener.

Definition at line 519 of file InventoryManager.php.

◆ requestSyncAll()

pocketmine\network\mcpe\InventoryManager::requestSyncAll ( )

Definition at line 680 of file InventoryManager.php.

◆ requestSyncSlot()

pocketmine\network\mcpe\InventoryManager::requestSyncSlot ( InventoryWindow $window,
int $slot )

Definition at line 529 of file InventoryManager.php.

◆ setCurrentItemStackRequestId()

pocketmine\network\mcpe\InventoryManager::setCurrentItemStackRequestId ( ?int $id)

Definition at line 312 of file InventoryManager.php.

◆ syncAll()

pocketmine\network\mcpe\InventoryManager::syncAll ( )

Definition at line 674 of file InventoryManager.php.

◆ syncCreative()

pocketmine\network\mcpe\InventoryManager::syncCreative ( )

Definition at line 760 of file InventoryManager.php.

◆ syncData()

pocketmine\network\mcpe\InventoryManager::syncData ( Inventory $inventory,
int $propertyId,
int $value )

Definition at line 722 of file InventoryManager.php.

◆ syncEnchantingTableOptions()

pocketmine\network\mcpe\InventoryManager::syncEnchantingTableOptions ( array $options)
Parameters
EnchantingOption[]$options@phpstan-param list<EnchantingOption> $options

Definition at line 768 of file InventoryManager.php.

References pocketmine\item\enchantment\EnchantmentInstance\getLevel(), and pocketmine\item\enchantment\EnchantmentInstance\getType().

+ Here is the call graph for this function:

◆ syncMismatchedPredictedSlotChanges()

pocketmine\network\mcpe\InventoryManager::syncMismatchedPredictedSlotChanges ( )

Definition at line 684 of file InventoryManager.php.

◆ syncSelectedHotbarSlot()

pocketmine\network\mcpe\InventoryManager::syncSelectedHotbarSlot ( )

Definition at line 739 of file InventoryManager.php.


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