|
Phpcraft
|


Public Member Functions | |
| send (Connection $con) | |
| __toString () | |
Static Public Member Functions | |
| static | read (Connection $con) |
| static | getColorId (array $rgb) |
Public Attributes | |
| $mapId = 0 | |
| $scale = 0 | |
| $markers = [] | |
| $x = 0 | |
| $z = 0 | |
| $width = 0 | |
| $height = 0 | |
| $contents = [] | |
Static Public Attributes | |
| static | $color_ids |
| static | $color_id_map_from_legacy |
| static | $color_id_map_to_legacy |
The packet sent to clients to update a map's contents and/or its markers.
| Phpcraft\Packet\MapData\MapDataPacket::__toString | ( | ) |
Reimplemented from Phpcraft\Packet\Packet.
|
static |
Gets the color ID closest to the given RGB array (3 integers).
| array{int,int,int} | $rgb |
|
static |
Initialises the packet class by reading its payload from the given Connection.
| Connection | $con |
| IOException |
Reimplemented from Phpcraft\Packet\Packet.
| Phpcraft\Packet\MapData\MapDataPacket::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.
|
static |
|
static |
|
static |
| array< int > Phpcraft\Packet\MapData\MapDataPacket::$contents = [] |
The contents of the map. This should have $width * $height elements.
| int Phpcraft\Packet\MapData\MapDataPacket::$height = 0 |
The height of the updated area.
| int Phpcraft\Packet\MapData\MapDataPacket::$mapId = 0 |
The map ID. See https://minecraft.gamepedia.com/Map#Item_data for the NBT data the map needs.
| array< MapMarker > Phpcraft\Packet\MapData\MapDataPacket::$markers = [] |
A MapMarkers array of markers on the map.
| int Phpcraft\Packet\MapData\MapDataPacket::$scale = 0 |
The scale of the map from a from 0 for a fully zoomed-in map (1 block per pixel) to 4 for a fully zoomed-out map (16 blocks per pixel). This is only shown when hovering over the map item, and doesn't effect rendering of the map when held.
| int Phpcraft\Packet\MapData\MapDataPacket::$width = 0 |
The width of the updated area.
| int Phpcraft\Packet\MapData\MapDataPacket::$x = 0 |
The x coordinate on the map at which the content update starts.
| int Phpcraft\Packet\MapData\MapDataPacket::$z = 0 |
The z coordinate on the map at which the content update starts.
1.8.17