GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
InteractPacket Class Reference

Public Member Functions

 decode ()
 
 encode ()
 
 getName ()
 
- Public Member Functions inherited from DataPacket
 pid ()
 
 encode ()
 
 decode ()
 
 reset ()
 
 clean ()
 
 __debugInfo ()
 
 getEntityMetadata (bool $types=true)
 
 putEntityMetadata (array $metadata)
 
 getName ()
 
- Public Member Functions inherited from BinaryStream
 __construct ($buffer="", $offset=0)
 
 reset ()
 
 setBuffer ($buffer=null, $offset=0)
 
 getOffset ()
 
 getBuffer ()
 
 get ($len)
 
 put ($str)
 
 getBool ()
 
 putBool ($v)
 
 getLong ()
 
 putLong ($v)
 
 getInt ()
 
 putInt ($v)
 
 getLLong ()
 
 putLLong ($v)
 
 getLInt ()
 
 putLInt ($v)
 
 getSignedShort ()
 
 putShort ($v)
 
 getShort ()
 
 putSignedShort ($v)
 
 getFloat (int $accuracy=-1)
 
 putFloat ($v)
 
 getLShort ($signed=true)
 
 putLShort ($v)
 
 getLFloat (int $accuracy=-1)
 
 putLFloat ($v)
 
 getTriad ()
 
 putTriad ($v)
 
 getLTriad ()
 
 putLTriad ($v)
 
 getByte ()
 
 putByte ($v)
 
 getUUID ()
 
 putUUID (UUID $uuid)
 
 getSlot ()
 
 putSlot (Item $item)
 
 getString ()
 
 putString ($v)
 
 getUnsignedVarInt ()
 
 putUnsignedVarInt ($v)
 
 getVarInt ()
 
 putVarInt ($v)
 
 getEntityId ()
 
 putEntityId ($v)
 
 getBlockCoords (&$x, &$y, &$z)
 
 putBlockCoords ($x, $y, $z)
 
 getVector3f (&$x, &$y, &$z)
 
 putVector3f ($x, $y, $z)
 
 feof ()
 

Data Fields

const NETWORK_ID = ProtocolInfo::INTERACT_PACKET
 
const ACTION_RIGHT_CLICK = 1
 
const ACTION_LEFT_CLICK = 2
 
const ACTION_LEAVE_VEHICLE = 3
 
const ACTION_MOUSEOVER = 4
 
 $action
 
 $eid
 
 $target
 
- Data Fields inherited from DataPacket
const NETWORK_ID = 0
 
 $isEncoded = false
 
- Data Fields inherited from BinaryStream
 $offset
 
 $buffer
 

Member Function Documentation

◆ decode()

decode ( )
43  {
44  $this->action = $this->getByte();
45  $this->target = $this->getEntityId();
46  }

◆ encode()

encode ( )
51  {
52  $this->reset();
53  $this->putByte($this->action);
54  $this->putEntityId($this->target);
55  }

◆ getName()

getName ( )
Returns
PacketName|string
60  {
61  return "InteractPacket";
62  }

Field Documentation

◆ $action

$action

◆ $eid

$eid

◆ $target

$target

◆ ACTION_LEAVE_VEHICLE

const ACTION_LEAVE_VEHICLE = 3

◆ ACTION_LEFT_CLICK

const ACTION_LEFT_CLICK = 2

◆ ACTION_MOUSEOVER

const ACTION_MOUSEOVER = 4

◆ ACTION_RIGHT_CLICK

const ACTION_RIGHT_CLICK = 1

◆ NETWORK_ID

const NETWORK_ID = ProtocolInfo::INTERACT_PACKET

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