From e39d2c46217b9e5fb4b77777654833127a2fbf7e Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 6 Oct 2020 13:40:49 +0100 Subject: [PATCH] Beacon: fixed crash in PC worlds --- src/block/tile/Beacon.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/block/tile/Beacon.php b/src/block/tile/Beacon.php index c2bb605f0..4d4b8cf6d 100644 --- a/src/block/tile/Beacon.php +++ b/src/block/tile/Beacon.php @@ -41,8 +41,8 @@ final class Beacon extends Spawnable{ public function readSaveData(CompoundTag $nbt) : void{ //TODO: PC uses Primary and Secondary (capitalized first letter), we don't read them here because the IDs would be different - $this->primaryEffect = $nbt->getInt(self::TAG_PRIMARY); - $this->secondaryEffect = $nbt->getInt(self::TAG_SECONDARY); + $this->primaryEffect = $nbt->getInt(self::TAG_PRIMARY, 0); + $this->secondaryEffect = $nbt->getInt(self::TAG_SECONDARY, 0); } protected function writeSaveData(CompoundTag $nbt) : void{