SetSpawnPositionPacket
extends DataPacket
in package
implements
ClientboundPacket
Interfaces, Classes, Traits and Enums
Table of Contents
- NETWORK_ID = \pocketmine\network\mcpe\protocol\ProtocolInfo::SET_SPAWN_POSITION_PACKET
- PID_MASK = 0x3ff
- TYPE_PLAYER_SPAWN = 0
- TYPE_WORLD_SPAWN = 1
- RECIPIENT_SUBCLIENT_ID_SHIFT = 12
- SENDER_SUBCLIENT_ID_SHIFT = 10
- SUBCLIENT_ID_MASK = 0x3
- $causingBlockPosition : BlockPosition
- Position of the respawn anchor or bed that this spawn position was set by.
- $dimension : int
- $recipientSubId : int
- $senderSubId : int
- $spawnPosition : BlockPosition
- $spawnType : int
- __get() : mixed
- __set() : void
- canBeSentBeforeLogin() : bool
- decode() : void
- encode() : void
- getName() : string
- handle() : bool
- pid() : int
- playerSpawn() : self
- worldSpawn() : self
- decodeHeader() : void
- decodePayload() : void
- Decodes the packet body, without the packet ID or other generic header fields.
- encodeHeader() : void
- encodePayload() : void
- Encodes the packet body, without the packet ID or other generic header fields.
- create() : self
Constants
NETWORK_ID
public
mixed
NETWORK_ID
= \pocketmine\network\mcpe\protocol\ProtocolInfo::SET_SPAWN_POSITION_PACKET
PID_MASK
public
mixed
PID_MASK
= 0x3ff
TYPE_PLAYER_SPAWN
public
mixed
TYPE_PLAYER_SPAWN
= 0
TYPE_WORLD_SPAWN
public
mixed
TYPE_WORLD_SPAWN
= 1
RECIPIENT_SUBCLIENT_ID_SHIFT
private
mixed
RECIPIENT_SUBCLIENT_ID_SHIFT
= 12
SENDER_SUBCLIENT_ID_SHIFT
private
mixed
SENDER_SUBCLIENT_ID_SHIFT
= 10
SUBCLIENT_ID_MASK
private
mixed
SUBCLIENT_ID_MASK
= 0x3
Properties
$causingBlockPosition
Position of the respawn anchor or bed that this spawn position was set by.
public
BlockPosition
$causingBlockPosition
This may be different from the spawn position (e.g. the actual spawn position may be next to a bed, while this would be the position of the bed block itself).
$dimension
public
int
$dimension
$recipientSubId
public
int
$recipientSubId
= 0
$senderSubId
public
int
$senderSubId
= 0
$spawnPosition
public
BlockPosition
$spawnPosition
$spawnType
public
int
$spawnType
Methods
__get()
public
__get(string $name) : mixed
Parameters
- $name : string
Return values
mixed —__set()
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
Return values
void —canBeSentBeforeLogin()
public
canBeSentBeforeLogin() : bool
Return values
bool —decode()
public
final decode(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Tags
Return values
void —encode()
public
final encode(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —getName()
public
getName() : string
Return values
string —handle()
public
handle(PacketHandlerInterface $handler) : bool
Parameters
- $handler : PacketHandlerInterface
Return values
bool —pid()
public
pid() : int
Return values
int —playerSpawn()
public
static playerSpawn(BlockPosition $spawnPosition, int $dimension, BlockPosition $causingBlockPosition) : self
Parameters
- $spawnPosition : BlockPosition
- $dimension : int
- $causingBlockPosition : BlockPosition
Return values
self —worldSpawn()
public
static worldSpawn(BlockPosition $spawnPosition, int $dimension) : self
Parameters
- $spawnPosition : BlockPosition
- $dimension : int
Return values
self —decodeHeader()
protected
decodeHeader(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Tags
Return values
void —decodePayload()
Decodes the packet body, without the packet ID or other generic header fields.
protected
decodePayload(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Return values
void —encodeHeader()
protected
encodeHeader(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —encodePayload()
Encodes the packet body, without the packet ID or other generic header fields.
protected
encodePayload(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —create()
private
static create(int $spawnType, BlockPosition $spawnPosition, int $dimension, BlockPosition $causingBlockPosition) : self
Parameters
- $spawnType : int
- $spawnPosition : BlockPosition
- $dimension : int
- $causingBlockPosition : BlockPosition