mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Clean up block update sending, remove UpdateBlockPacket flag constants
These flags are not intended for network use, instead they are supposed to be used internally by the game. For network, we only need to care about the 0x02 flag (send to players) because that's necessary for the client to render the block.
This commit is contained in:
@ -31,15 +31,6 @@ use pocketmine\network\mcpe\handler\SessionHandler;
|
||||
class UpdateBlockPacket extends DataPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::UPDATE_BLOCK_PACKET;
|
||||
|
||||
public const FLAG_NONE = 0b0000;
|
||||
public const FLAG_NEIGHBORS = 0b0001;
|
||||
public const FLAG_NETWORK = 0b0010;
|
||||
public const FLAG_NOGRAPHIC = 0b0100;
|
||||
public const FLAG_PRIORITY = 0b1000;
|
||||
|
||||
public const FLAG_ALL = self::FLAG_NEIGHBORS | self::FLAG_NETWORK;
|
||||
public const FLAG_ALL_PRIORITY = self::FLAG_ALL | self::FLAG_PRIORITY;
|
||||
|
||||
public const DATA_LAYER_NORMAL = 0;
|
||||
public const DATA_LAYER_LIQUID = 1;
|
||||
|
||||
@ -51,8 +42,12 @@ class UpdateBlockPacket extends DataPacket{
|
||||
public $y;
|
||||
/** @var int */
|
||||
public $blockRuntimeId;
|
||||
/** @var int */
|
||||
public $flags;
|
||||
/**
|
||||
* @var int
|
||||
* Flags are used by MCPE internally for block setting, but only flag 2 (network flag) is relevant for network.
|
||||
* This field is pointless really.
|
||||
*/
|
||||
public $flags = 0x02;
|
||||
/** @var int */
|
||||
public $dataLayerId = self::DATA_LAYER_NORMAL;
|
||||
|
||||
|
Reference in New Issue
Block a user