PocketMine-MP 5.15.1 git-5ef247620a7c6301a849b54e5ef1009217729fc8
pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction Class Reference
+ Collaboration diagram for pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction:

Public Member Functions

 read (PacketSerializer $packet)
 
 write (PacketSerializer $packet)
 

Public Attributes

int $inventorySlot
 
ItemStackWrapper $newItem
 
ItemStackWrapper $oldItem
 
int $sourceFlags = 0
 
int $sourceType
 
int $windowId
 
const ACTION_MAGIC_SLOT_CREATIVE_CREATE_ITEM = 1
 
const ACTION_MAGIC_SLOT_CREATIVE_DELETE_ITEM = 0
 
const ACTION_MAGIC_SLOT_DROP_ITEM = 0
 
const ACTION_MAGIC_SLOT_PICKUP_ITEM = 1
 
const SOURCE_CONTAINER = 0
 
const SOURCE_CREATIVE = 3
 
const SOURCE_TODO = 99999
 
const SOURCE_TYPE_ANVIL_OUTPUT = -13
 
const SOURCE_TYPE_ANVIL_RESULT = -12
 
const SOURCE_TYPE_BEACON = -24
 
const SOURCE_TYPE_CRAFTING_RESULT = -4
 
const SOURCE_TYPE_CRAFTING_USE_INGREDIENT = -5
 
const SOURCE_TYPE_ENCHANT_OUTPUT = -17
 
const SOURCE_TYPE_TRADING_INPUT_1 = -20
 
const SOURCE_TYPE_TRADING_INPUT_2 = -21
 
const SOURCE_TYPE_TRADING_OUTPUT = -23
 
const SOURCE_TYPE_TRADING_USE_INPUTS = -22
 
const SOURCE_WORLD = 2
 

Detailed Description

Definition at line 21 of file NetworkInventoryAction.php.

Member Function Documentation

◆ read()

pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::read ( PacketSerializer  $packet)
Returns
$this
Exceptions
BinaryDataException
PacketDecodeException

Definition at line 71 of file NetworkInventoryAction.php.

References pocketmine\utils\BinaryStream\getUnsignedVarInt(), and pocketmine\utils\BinaryStream\getVarInt().

+ Here is the call graph for this function:

◆ write()

pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::write ( PacketSerializer  $packet)
Exceptions

InvalidArgumentException

Definition at line 100 of file NetworkInventoryAction.php.

References pocketmine\utils\BinaryStream\putUnsignedVarInt(), and pocketmine\utils\BinaryStream\putVarInt().

+ Here is the call graph for this function:

Member Data Documentation

◆ $inventorySlot

int pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::$inventorySlot

Definition at line 61 of file NetworkInventoryAction.php.

◆ $newItem

ItemStackWrapper pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::$newItem

Definition at line 63 of file NetworkInventoryAction.php.

◆ $oldItem

ItemStackWrapper pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::$oldItem

Definition at line 62 of file NetworkInventoryAction.php.

◆ $sourceFlags

int pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::$sourceFlags = 0

Definition at line 60 of file NetworkInventoryAction.php.

◆ $sourceType

int pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::$sourceType

Definition at line 58 of file NetworkInventoryAction.php.

◆ $windowId

int pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::$windowId

Definition at line 59 of file NetworkInventoryAction.php.

◆ ACTION_MAGIC_SLOT_CREATIVE_CREATE_ITEM

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::ACTION_MAGIC_SLOT_CREATIVE_CREATE_ITEM = 1

Definition at line 53 of file NetworkInventoryAction.php.

◆ ACTION_MAGIC_SLOT_CREATIVE_DELETE_ITEM

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::ACTION_MAGIC_SLOT_CREATIVE_DELETE_ITEM = 0

Definition at line 52 of file NetworkInventoryAction.php.

◆ ACTION_MAGIC_SLOT_DROP_ITEM

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::ACTION_MAGIC_SLOT_DROP_ITEM = 0

Definition at line 55 of file NetworkInventoryAction.php.

◆ ACTION_MAGIC_SLOT_PICKUP_ITEM

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::ACTION_MAGIC_SLOT_PICKUP_ITEM = 1

Definition at line 56 of file NetworkInventoryAction.php.

◆ SOURCE_CONTAINER

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_CONTAINER = 0

Definition at line 22 of file NetworkInventoryAction.php.

◆ SOURCE_CREATIVE

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_CREATIVE = 3

Definition at line 25 of file NetworkInventoryAction.php.

◆ SOURCE_TODO

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TODO = 99999

Definition at line 26 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_ANVIL_OUTPUT

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_ANVIL_OUTPUT = -13

Definition at line 41 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_ANVIL_RESULT

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_ANVIL_RESULT = -12

Definition at line 40 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_BEACON

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_BEACON = -24

Definition at line 50 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_CRAFTING_RESULT

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_CRAFTING_RESULT = -4

Fake window IDs for the SOURCE_TODO type (99999)

These identifiers are used for inventory source types which are not currently implemented server-side in MCPE. As a general rule of thumb, anything that doesn't have a permanent inventory is client-side. These types are to allow servers to track what is going on in client-side windows.

Expect these to change in the future.

Definition at line 37 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_CRAFTING_USE_INGREDIENT

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_CRAFTING_USE_INGREDIENT = -5

Definition at line 38 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_ENCHANT_OUTPUT

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_ENCHANT_OUTPUT = -17

Definition at line 43 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_TRADING_INPUT_1

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_TRADING_INPUT_1 = -20

Definition at line 45 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_TRADING_INPUT_2

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_TRADING_INPUT_2 = -21

Definition at line 46 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_TRADING_OUTPUT

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_TRADING_OUTPUT = -23

Definition at line 48 of file NetworkInventoryAction.php.

◆ SOURCE_TYPE_TRADING_USE_INPUTS

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_TYPE_TRADING_USE_INPUTS = -22

Definition at line 47 of file NetworkInventoryAction.php.

◆ SOURCE_WORLD

const pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction::SOURCE_WORLD = 2

Definition at line 24 of file NetworkInventoryAction.php.


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