PocketMine-MP 5.42.1 git-d77520d210fcb967a02bc11817ad625393c8ebc6
Loading...
Searching...
No Matches
pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData Class Reference
+ Inheritance diagram for pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData:
+ Collaboration diagram for pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData:

Public Member Functions

 decode (ByteBufferReader $in)
 
 encode (ByteBufferWriter $out)
 
 getActions ()
 
 getActionType ()
 
 getBlockPosition ()
 
 getBlockRuntimeId ()
 
 getClickPosition ()
 
 getClientCooldownState ()
 
 getClientInteractPrediction ()
 
 getFace ()
 
 getHotbarSlot ()
 
 getItemInHand ()
 
 getPlayerPosition ()
 
 getTriggerType ()
 
 getTypeId ()
 

Static Public Member Functions

static new (array $actions, int $actionType, TriggerType $triggerType, BlockPosition $blockPosition, int $face, int $hotbarSlot, ItemStackWrapper $itemInHand, Vector3 $playerPosition, Vector3 $clickPosition, int $blockRuntimeId, PredictedResult $clientInteractPrediction, int $clientCooldownState)
 

Public Attributes

const ACTION_BREAK_BLOCK = 2
 
const ACTION_CLICK_AIR = 1
 
const ACTION_CLICK_BLOCK = 0
 
const ACTION_USE_AS_ATTACK = 3
 
const ID = InventoryTransactionPacket::TYPE_USE_ITEM
 

Protected Member Functions

 decodeData (ByteBufferReader $in)
 
 encodeData (ByteBufferWriter $out)
 

Protected Attributes

array $actions = []
 

Detailed Description

Definition at line 27 of file UseItemTransactionData.php.

Member Function Documentation

◆ decode()

pocketmine\network\mcpe\protocol\types\inventory\TransactionData::decode ( ByteBufferReader $in)
finalinherited
Exceptions
DataDecodeException
PacketDecodeException

Definition at line 41 of file TransactionData.php.

◆ decodeData()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::decodeData ( ByteBufferReader $in)
protected
Exceptions
DataDecodeException
PacketDecodeException

Reimplemented from pocketmine\network\mcpe\protocol\types\inventory\TransactionData.

Definition at line 87 of file UseItemTransactionData.php.

◆ encode()

pocketmine\network\mcpe\protocol\types\inventory\TransactionData::encode ( ByteBufferWriter $out)
finalinherited

Definition at line 55 of file TransactionData.php.

◆ encodeData()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::encodeData ( ByteBufferWriter $out)
protected

◆ getActions()

pocketmine\network\mcpe\protocol\types\inventory\TransactionData::getActions ( )
finalinherited
Returns
NetworkInventoryAction[]

Definition at line 31 of file TransactionData.php.

◆ getActionType()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getActionType ( )

Definition at line 49 of file UseItemTransactionData.php.

◆ getBlockPosition()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getBlockPosition ( )

Definition at line 55 of file UseItemTransactionData.php.

◆ getBlockRuntimeId()

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

Definition at line 79 of file UseItemTransactionData.php.

◆ getClickPosition()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getClickPosition ( )

Definition at line 75 of file UseItemTransactionData.php.

◆ getClientCooldownState()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getClientCooldownState ( )

Definition at line 85 of file UseItemTransactionData.php.

◆ getClientInteractPrediction()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getClientInteractPrediction ( )

Definition at line 83 of file UseItemTransactionData.php.

◆ getFace()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getFace ( )

Definition at line 59 of file UseItemTransactionData.php.

◆ getHotbarSlot()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getHotbarSlot ( )

Definition at line 63 of file UseItemTransactionData.php.

◆ getItemInHand()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getItemInHand ( )

Definition at line 67 of file UseItemTransactionData.php.

◆ getPlayerPosition()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getPlayerPosition ( )

Definition at line 71 of file UseItemTransactionData.php.

◆ getTriggerType()

pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::getTriggerType ( )

Definition at line 53 of file UseItemTransactionData.php.

◆ new()

static pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::new ( array $actions,
int $actionType,
TriggerType $triggerType,
BlockPosition $blockPosition,
int $face,
int $hotbarSlot,
ItemStackWrapper $itemInHand,
Vector3 $playerPosition,
Vector3 $clickPosition,
int $blockRuntimeId,
PredictedResult $clientInteractPrediction,
int $clientCooldownState )
static
Parameters
NetworkInventoryAction[]$actions

Definition at line 149 of file UseItemTransactionData.php.

Member Data Documentation

◆ $actions

array pocketmine\network\mcpe\protocol\types\inventory\TransactionData::$actions = []
protectedinherited

Definition at line 26 of file TransactionData.php.

◆ ACTION_BREAK_BLOCK

const pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::ACTION_BREAK_BLOCK = 2

Definition at line 34 of file UseItemTransactionData.php.

◆ ACTION_CLICK_AIR

const pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::ACTION_CLICK_AIR = 1

Definition at line 33 of file UseItemTransactionData.php.

◆ ACTION_CLICK_BLOCK

const pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::ACTION_CLICK_BLOCK = 0

Definition at line 32 of file UseItemTransactionData.php.

◆ ACTION_USE_AS_ATTACK

const pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::ACTION_USE_AS_ATTACK = 3

Definition at line 35 of file UseItemTransactionData.php.

◆ ID

const pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData::ID = InventoryTransactionPacket::TYPE_USE_ITEM

Definition at line 30 of file UseItemTransactionData.php.


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