PocketMine-MP 5.33.2 git-1133d49c924b4358c79d44eeb97dcbf56cb4d1eb
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 85 of file InventoryManager.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 126 of file InventoryManager.php.

Member Function Documentation

◆ addPredictedSlotChange()

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

Definition at line 264 of file InventoryManager.php.

◆ addRawPredictedSlotChanges()

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

Definition at line 287 of file InventoryManager.php.

◆ addTransactionPredictedSlotChanges()

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

Definition at line 270 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 393 of file InventoryManager.php.

◆ flushPendingUpdates()

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

Definition at line 692 of file InventoryManager.php.

◆ getContainerOpenCallbacks()

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

@phpstan-return ObjectSet<ContainerOpenClosure>

Definition at line 387 of file InventoryManager.php.

◆ getCurrentWindowId()

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

Definition at line 234 of file InventoryManager.php.

◆ getEnchantingTableOptionIndex()

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

Definition at line 784 of file InventoryManager.php.

◆ getInventoryWindow()

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

Definition at line 164 of file InventoryManager.php.

◆ getItemStackInfo()

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

Definition at line 792 of file InventoryManager.php.

◆ getWindowId()

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

Definition at line 230 of file InventoryManager.php.

◆ locateWindowAndSlot()

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

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

Definition at line 241 of file InventoryManager.php.

◆ onClientOpenMainInventory()

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

Definition at line 421 of file InventoryManager.php.

◆ onClientRemoveWindow()

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

Definition at line 450 of file InventoryManager.php.

◆ onClientSelectHotbarSlot()

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

Definition at line 725 of file InventoryManager.php.

◆ onContentChange()

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

Implements pocketmine\inventory\InventoryListener.

Definition at line 619 of file InventoryManager.php.

◆ onCurrentWindowChange()

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

Definition at line 356 of file InventoryManager.php.

◆ onCurrentWindowRemove()

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

Definition at line 438 of file InventoryManager.php.

◆ onSlotChange()

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

Implements pocketmine\inventory\InventoryListener.

Definition at line 509 of file InventoryManager.php.

◆ requestSyncAll()

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

Definition at line 670 of file InventoryManager.php.

◆ requestSyncSlot()

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

Definition at line 519 of file InventoryManager.php.

◆ setCurrentItemStackRequestId()

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

Definition at line 311 of file InventoryManager.php.

◆ syncAll()

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

Definition at line 664 of file InventoryManager.php.

◆ syncCreative()

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

Definition at line 750 of file InventoryManager.php.

◆ syncData()

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

Definition at line 712 of file InventoryManager.php.

◆ syncEnchantingTableOptions()

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

Definition at line 758 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 674 of file InventoryManager.php.

◆ syncSelectedHotbarSlot()

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

Definition at line 729 of file InventoryManager.php.


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