Skip to content

Commit

Permalink
Fixed Painting problem (Fixed #153)
Browse files Browse the repository at this point in the history
(cherry picked from commit 26c5389)
  • Loading branch information
hmy2001 committed Aug 17, 2019
1 parent b1ebe93 commit 403b7c6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/shoghicp/BigBrother/network/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 403b7c6

Please sign in to comment.