PocketMine-MP 5.28.3 git-94fb5d95b92604840dabb719f04327efa559cf94
Loading...
Searching...
No Matches
pocketmine\network\mcpe\protocol\types\inventory\ItemStack Class Reference
+ Inheritance diagram for pocketmine\network\mcpe\protocol\types\inventory\ItemStack:
+ Collaboration diagram for pocketmine\network\mcpe\protocol\types\inventory\ItemStack:

Public Member Functions

 __construct (private int $id, private int $meta, private int $count, private int $blockRuntimeId, private string $rawExtraData,)
 
 equals (ItemStack $itemStack)
 
 equalsWithoutCount (ItemStack $itemStack)
 
 getBlockRuntimeId ()
 
 getCount ()
 
 getId ()
 
 getMeta ()
 
 getRawExtraData ()
 
 isNull ()
 
 jsonSerialize ()
 

Static Public Member Functions

static null ()
 

Detailed Description

Definition at line 19 of file ItemStack.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::__construct ( private int $id,
private int $meta,
private int $count,
private int $blockRuntimeId,
private string $rawExtraData )
Parameters
string$rawExtraDataSerialized ItemStackExtraData (use ItemStackExtraData->write())
See also
ItemStackExtraData::write()

Definition at line 24 of file ItemStack.php.

Member Function Documentation

◆ equals()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::equals ( ItemStack $itemStack)

Definition at line 63 of file ItemStack.php.

◆ equalsWithoutCount()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::equalsWithoutCount ( ItemStack $itemStack)

Definition at line 67 of file ItemStack.php.

◆ getBlockRuntimeId()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::getBlockRuntimeId ( )

Definition at line 52 of file ItemStack.php.

◆ getCount()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::getCount ( )

Definition at line 48 of file ItemStack.php.

◆ getId()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::getId ( )

Definition at line 40 of file ItemStack.php.

◆ getMeta()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::getMeta ( )

Definition at line 44 of file ItemStack.php.

◆ getRawExtraData()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::getRawExtraData ( )

Decode this into ItemStackExtraData using ItemStackExtraData::read() (or ItemStackExtraDataShield::read() if this data is for a shield item) This isn't automatically decoded because it's usually not needed and is sometimes expensive to decode.

See also
ItemStackExtraData::read()
ItemStackExtraDataShield::read()

Definition at line 61 of file ItemStack.php.

◆ isNull()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::isNull ( )

Definition at line 36 of file ItemStack.php.

◆ jsonSerialize()

pocketmine\network\mcpe\protocol\types\inventory\ItemStack::jsonSerialize ( )
Returns
mixed[]

Definition at line 76 of file ItemStack.php.

◆ null()

static pocketmine\network\mcpe\protocol\types\inventory\ItemStack::null ( )
static

Definition at line 32 of file ItemStack.php.


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