Phpcraft
|
Public Member Functions | |
__construct ($eid=0, EntityType $type=null, UUID $uuid=null) | |
send (Connection $con) | |
__toString () | |
Static Public Member Functions | |
static | read (Connection $con) |
Public Attributes | |
$eid | |
$uuid | |
$type | |
$pos | |
$yaw = 0 | |
$pitch = 0 | |
$metadata | |
Phpcraft\Packet\SpawnMobPacket::__construct | ( | $eid = 0 , |
|
EntityType | $type = null , |
||
UUID | $uuid = null |
||
) |
GMP | int | string | $eid | The entity ID of the mob. |
EntityType | null | $type | The type of mob. |
UUID | null | $uuid | The UUID of the entity. |
Phpcraft\Packet\SpawnMobPacket::__toString | ( | ) |
Reimplemented from Phpcraft\Packet\Packet.
|
static |
Initialises the packet class by reading its payload from the given Connection.
Connection | $con |
IOException |
Reimplemented from Phpcraft\Packet\Packet.
Phpcraft\Packet\SpawnMobPacket::send | ( | Connection | $con | ) |
Adds the packet's ID and payload to the Connection's write buffer and sends it over the wire if the connection has a stream. Note that in some cases this will produce multiple Minecraft packets, therefore you should only use this on connections without a stream if you know what you're doing.
Connection | $con |
IOException |
Reimplemented from Phpcraft\Packet\Packet.
GMP Phpcraft\Packet\SpawnMobPacket::$eid |
The entity ID of the mob.
Metadata Phpcraft\Packet\SpawnMobPacket::$metadata |
The entity metadata of the mob.
float Phpcraft\Packet\SpawnMobPacket::$pitch = 0 |
The mob's rotation on the Y axis, -90 to 90.
Point3D Phpcraft\Packet\SpawnMobPacket::$pos |
The position of the mob.
EntityType Phpcraft\Packet\SpawnMobPacket::$type |
The type of mob.
UUID Phpcraft\Packet\SpawnMobPacket::$uuid |
The UUID of the entity.
float Phpcraft\Packet\SpawnMobPacket::$yaw = 0 |
The mob's rotation on the X axis, 0 to 359.9.