mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-05 11:27:07 +00:00
1.12: fix resource packs, closes #3023
This commit is contained in:
parent
3fae57508b
commit
94eb64c2be
@ -28,6 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
|
||||
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\protocol\types\ResourcePackType;
|
||||
|
||||
class ResourcePackDataInfoPacket extends DataPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_DATA_INFO_PACKET;
|
||||
@ -45,7 +46,7 @@ class ResourcePackDataInfoPacket extends DataPacket{
|
||||
/** @var bool */
|
||||
public $isPremium = false;
|
||||
/** @var int */
|
||||
public $packType = 0; //TODO: check the values for this
|
||||
public $packType = ResourcePackType::RESOURCES; //TODO: check the values for this
|
||||
|
||||
protected function decodePayload(){
|
||||
$this->packId = $this->getString();
|
||||
|
@ -0,0 +1,38 @@
|
||||
<?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\types;
|
||||
|
||||
final class ResourcePackType{
|
||||
|
||||
private function __construct(){
|
||||
//NOOP
|
||||
}
|
||||
|
||||
public const INVALID = 0;
|
||||
public const RESOURCES = 1;
|
||||
public const BEHAVIORS = 2;
|
||||
public const WORLD_TEMPLATE = 3;
|
||||
public const ADDON = 4; //scripts?
|
||||
public const SKINS = 5;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user