Is it possible to spawn colored beacon light to a player? what function to use? i have not tried yet to implement it
Yes, you'll need to send the player a ghost tile. This tile will not be handled by PocketMine. If you want it to be handled by PocketMine, then you will need to register a new tile. It's possible to register tiles without source editing, unlike registering inventories. Send BlockEntityDataPacket to the player you want to spawn the beacon to. PHP: /** @var Player $player *//** @var int $x, $y, $z */$pk = new BlockEntityDataPacket();$pk->x = $x;$pk->y = $y;$pk->z = $z;$pk->namedtag = new CompoundTag("", [ new StringTag("id", "Beacon"), new IntTag("x", $x), new IntTag("y", $y), new IntTag("z", $z)]);$player->dataPacket($pk);
I Got This Code: [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\utils\BinaryStream::putVarInt() must be of the type integer, float given, called in /Users/chaostix/Desktop/pm1/src/pocketmine/network/mcpe/protocol/DataPacket.php on line 306" (EXCEPTION) in "/src/pocketmine/utils/BinaryStream" at line 321