PocketMine-MP 5.37.4 git-dbb3eefc44d5dddb20f540594fbda61467f50873
Loading...
Searching...
No Matches
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 (ByteBufferWriter $out)
 

Static Public Member Functions

static read (ByteBufferReader $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 34 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 39 of file ItemStackExtraData.php.

Member Function Documentation

◆ getCanDestroy()

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

Definition at line 55 of file ItemStackExtraData.php.

◆ getCanPlaceOn()

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

Definition at line 48 of file ItemStackExtraData.php.

◆ getNbt()

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

Definition at line 59 of file ItemStackExtraData.php.

◆ read()

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

Definition at line 63 of file ItemStackExtraData.php.

◆ write()

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

Definition at line 99 of file ItemStackExtraData.php.


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