mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Revert "resource packs: added new option remove_client_resources, fixed client packs being removed when forcing resource pack download"
This reverts commit 06ec8b8397
.
unfortunately, this had some unanticipated side effects, thanks to
idiotic behaviour in the client ... when having optional downloads but
trying to force resources, the client chokes because it thinks the
server is forcing it to apply a pack that it doesn't have. Since
there's no way to detect when this problem occurs in the protocol, the
only option is to revert this.
This commit is contained in:
@ -35,7 +35,7 @@ class ResourcePackStackPacket extends DataPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_STACK_PACKET;
|
||||
|
||||
/** @var bool */
|
||||
public $removeClientResourcePacks = false;
|
||||
public $mustAccept = false;
|
||||
|
||||
/** @var ResourcePack[] */
|
||||
public $behaviorPackStack = [];
|
||||
@ -48,7 +48,7 @@ class ResourcePackStackPacket extends DataPacket{
|
||||
public $baseGameVersion = ProtocolInfo::MINECRAFT_VERSION_NETWORK;
|
||||
|
||||
protected function decodePayload(){
|
||||
$this->removeClientResourcePacks = $this->getBool();
|
||||
$this->mustAccept = $this->getBool();
|
||||
$behaviorPackCount = $this->getUnsignedVarInt();
|
||||
while($behaviorPackCount-- > 0){
|
||||
$this->getString();
|
||||
@ -68,7 +68,7 @@ class ResourcePackStackPacket extends DataPacket{
|
||||
}
|
||||
|
||||
protected function encodePayload(){
|
||||
$this->putBool($this->removeClientResourcePacks);
|
||||
$this->putBool($this->mustAccept);
|
||||
|
||||
$this->putUnsignedVarInt(count($this->behaviorPackStack));
|
||||
foreach($this->behaviorPackStack as $entry){
|
||||
|
Reference in New Issue
Block a user