From 2409e8c66c147a49419285803f70b73fcbd4a383 Mon Sep 17 00:00:00 2001 From: hmy2001 Date: Sun, 18 Aug 2019 01:56:49 +0900 Subject: [PATCH] Fixed Painting problem (Fixed #153) (cherry picked from commit 26c53895155d53839659dd5009855b8fde924fbd) --- src/shoghicp/BigBrother/network/Translator.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/shoghicp/BigBrother/network/Translator.php b/src/shoghicp/BigBrother/network/Translator.php index 0a814a81..266ff7da 100644 --- a/src/shoghicp/BigBrother/network/Translator.php +++ b/src/shoghicp/BigBrother/network/Translator.php @@ -1604,15 +1604,7 @@ public function serverToInterface(DesktopPlayer $player, DataPacket $packet){ case Info::ADD_PAINTING_PACKET: /** @var AddPaintingPacket $packet */ - $directions = [ - 0 => Vector3::SIDE_SOUTH, - 1 => Vector3::SIDE_WEST, - 2 => Vector3::SIDE_NORTH, - 3 => Vector3::SIDE_EAST - ]; - - $paintingPos = new Vector3($packet->position->x, $packet->position->y, $packet->position->z); - $spawnPaintingPos = $paintingPos->getSide($directions[$packet->direction]); + $spawnPaintingPos = (new Vector3($packet->position->x, $packet->position->y, $packet->position->z))->floor(); $pk = new SpawnPaintingPacket(); $pk->eid = $packet->entityRuntimeId;