From a686840e5e2fe3126729197f4e6dd08bda678fe3 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 17 Jun 2020 21:33:56 +0100 Subject: [PATCH] RuntimeBlockMapping: fixed palette cache never being initialized I must have been very tired when I wrote this code --- src/network/mcpe/convert/RuntimeBlockMapping.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/mcpe/convert/RuntimeBlockMapping.php b/src/network/mcpe/convert/RuntimeBlockMapping.php index 54002ed50..9c4b08536 100644 --- a/src/network/mcpe/convert/RuntimeBlockMapping.php +++ b/src/network/mcpe/convert/RuntimeBlockMapping.php @@ -161,6 +161,6 @@ final class RuntimeBlockMapping{ * @phpstan-return CacheableNbt<\pocketmine\nbt\tag\ListTag> */ public function getStartGamePaletteCache() : CacheableNbt{ - return $this->startGamePaletteCache ?? new CacheableNbt(new ListTag($this->bedrockKnownStates)); + return $this->startGamePaletteCache ?? ($this->startGamePaletteCache = new CacheableNbt(new ListTag($this->bedrockKnownStates))); } }