Remove GarbageServerboundPacket

it's not the protocol implementation's job to decide what's garbage. It should only indicate that a packet MAY be sent by the client. It should then be up to the handler to decide what to do with it.
This commit is contained in:
Dylan K. Taylor
2021-04-19 01:07:21 +01:00
parent 6845cbb2b3
commit 66fdf526d4
4 changed files with 6 additions and 41 deletions

View File

@ -1,32 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\network\mcpe\protocol;
/**
* This interface can be implemented by packets which are erroneously sent to the server by a buggy client to filter
* them out.
*/
interface GarbageServerboundPacket extends Packet{
}

View File

@ -28,10 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\math\Vector3;
use pocketmine\network\mcpe\protocol\serializer\PacketSerializer;
/**
* TODO: This packet is (erroneously) sent to the server when the client is riding a vehicle.
*/
class SetActorMotionPacket extends DataPacket implements ClientboundPacket, GarbageServerboundPacket{
class SetActorMotionPacket extends DataPacket implements ClientboundPacket, ServerboundPacket{
public const NETWORK_ID = ProtocolInfo::SET_ACTOR_MOTION_PACKET;
/** @var int */