mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-14 17:59:41 +00:00
Make chemistry textures always enabled
This commit is contained in:
parent
fae6289eb8
commit
774e6fe8a3
@ -35,6 +35,7 @@ use pocketmine\network\mcpe\protocol\types\resourcepacks\ResourcePackStackEntry;
|
|||||||
use pocketmine\resourcepacks\ResourcePack;
|
use pocketmine\resourcepacks\ResourcePack;
|
||||||
use pocketmine\resourcepacks\ResourcePackManager;
|
use pocketmine\resourcepacks\ResourcePackManager;
|
||||||
use function array_map;
|
use function array_map;
|
||||||
|
use function array_unshift;
|
||||||
use function ceil;
|
use function ceil;
|
||||||
use function count;
|
use function count;
|
||||||
use function implode;
|
use function implode;
|
||||||
@ -112,6 +113,10 @@ class ResourcePacksPacketHandler extends PacketHandler{
|
|||||||
$stack = array_map(static function(ResourcePack $pack){
|
$stack = array_map(static function(ResourcePack $pack){
|
||||||
return new ResourcePackStackEntry($pack->getPackId(), $pack->getPackVersion(), ""); //TODO: subpacks
|
return new ResourcePackStackEntry($pack->getPackId(), $pack->getPackVersion(), ""); //TODO: subpacks
|
||||||
}, $this->resourcePackManager->getResourceStack());
|
}, $this->resourcePackManager->getResourceStack());
|
||||||
|
|
||||||
|
//we support chemistry blocks by default, the client should already have this installed
|
||||||
|
array_unshift($stack, new ResourcePackStackEntry("0fba4063-dba1-4281-9b89-ff9390653530", "1.0.0", ""));
|
||||||
|
|
||||||
$this->session->sendDataPacket(ResourcePackStackPacket::create($stack, [], $this->resourcePackManager->resourcePacksRequired(), false));
|
$this->session->sendDataPacket(ResourcePackStackPacket::create($stack, [], $this->resourcePackManager->resourcePacksRequired(), false));
|
||||||
$this->session->getLogger()->debug("Applying resource pack stack");
|
$this->session->getLogger()->debug("Applying resource pack stack");
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user