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

Public Member Functions

 __construct (private ?CompoundTag $nbt, private array $canPlaceOn, private array $canDestroy)
 
 getCanDestroy ()
 
 getCanPlaceOn ()
 
 getNbt ()
 
 write (PacketSerializer $out)
 

Static Public Member Functions

static read (PacketSerializer $in)
 

Detailed Description

Wrapper class for extra data on ItemStacks. The data is normally provided as a raw string (not automatically decoded). This class is just a DTO for PacketSerializer to use when encoding/decoding ItemStacks.

Definition at line 31 of file ItemStackExtraData.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\network\mcpe\protocol\types\inventory\ItemStackExtraData::__construct ( private ?CompoundTag  $nbt,
private array  $canPlaceOn,
private array  $canDestroy 
)
Parameters
string[]$canPlaceOn
string[]$canDestroy

Definition at line 36 of file ItemStackExtraData.php.

Member Function Documentation

◆ getCanDestroy()

pocketmine\network\mcpe\protocol\types\inventory\ItemStackExtraData::getCanDestroy ( )
Returns
string[]

Definition at line 52 of file ItemStackExtraData.php.

◆ getCanPlaceOn()

pocketmine\network\mcpe\protocol\types\inventory\ItemStackExtraData::getCanPlaceOn ( )
Returns
string[]

Definition at line 45 of file ItemStackExtraData.php.

◆ getNbt()

pocketmine\network\mcpe\protocol\types\inventory\ItemStackExtraData::getNbt ( )

Definition at line 56 of file ItemStackExtraData.php.

◆ read()

static pocketmine\network\mcpe\protocol\types\inventory\ItemStackExtraData::read ( PacketSerializer  $in)
static

Definition at line 60 of file ItemStackExtraData.php.

◆ write()

pocketmine\network\mcpe\protocol\types\inventory\ItemStackExtraData::write ( PacketSerializer  $out)

Definition at line 95 of file ItemStackExtraData.php.


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