diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 4c57046a8..6083161be 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -857,6 +857,16 @@ class Level implements ChunkManager, Metadatable{ $this->sleepTicks = $ticks; } + /** + * @deprecated + * + * @param int $x + * @param int $y + * @param int $z + * @param int $id + * @param int $data + * @param Player[]|null $targets + */ public function sendBlockExtraData(int $x, int $y, int $z, int $id, int $data, array $targets = null){ $pk = new LevelEventPacket; $pk->evid = LevelEventPacket::EVENT_SET_DATA; @@ -2128,6 +2138,8 @@ class Level implements ChunkManager, Metadatable{ } /** + * @deprecated This functionality no longer produces any effect and will be removed in a future release + * * Gets the raw block extra data * * @param int $x @@ -2141,6 +2153,7 @@ class Level implements ChunkManager, Metadatable{ } /** + * @deprecated This functionality no longer produces any effect and will be removed in a future release * Sets the raw block metadata. * * @param int $x diff --git a/src/pocketmine/level/format/Chunk.php b/src/pocketmine/level/format/Chunk.php index 46717551b..4c20ffbbe 100644 --- a/src/pocketmine/level/format/Chunk.php +++ b/src/pocketmine/level/format/Chunk.php @@ -98,7 +98,7 @@ class Chunk{ * @param CompoundTag[] $tiles * @param string $biomeIds * @param int[] $heightMap - * @param int[] $extraData + * @param int[] $extraData @deprecated */ public function __construct(int $chunkX, int $chunkZ, array $subChunks = [], array $entities = [], array $tiles = [], string $biomeIds = "", array $heightMap = [], array $extraData = []){ $this->x = $chunkX; @@ -255,7 +255,7 @@ class Chunk{ } /** - * Returns the raw block extra data value at the specified chunk block coordinates, or 0 if no data exists + * @deprecated This functionality no longer produces any visible effects and will be removed in a future release * * @param int $x 0-15 * @param int $y @@ -268,7 +268,7 @@ class Chunk{ } /** - * Sets the raw block extra data value at the specified chunk block coordinates + * @deprecated This functionality no longer produces any visible effects and will be removed in a future release * * @param int $x 0-15 * @param int $y @@ -780,6 +780,7 @@ class Chunk{ } /** + * @deprecated * @return int[] */ public function getBlockExtraDataArray() : array{ @@ -906,14 +907,6 @@ class Chunk{ . chr(0); //border block array count //Border block entry format: 1 byte (4 bits X, 4 bits Z). These are however useless since they crash the regular client. - $extraData = new BinaryStream(); - $extraData->putVarInt(count($this->extraData)); //WHY, Mojang, WHY - foreach($this->extraData as $key => $value){ - $extraData->putVarInt($key); - $extraData->putLShort($value); - } - $result .= $extraData->getBuffer(); - foreach($this->tiles as $tile){ if($tile instanceof Spawnable){ $result .= $tile->getSerializedSpawnCompound(); @@ -979,6 +972,8 @@ class Chunk{ } /** + * @deprecated This will be removed in a future release + * * Creates a block hash from chunk block coordinates. Used for extra data keys in chunk packets. * @internal *