From 954e8e6e6f673295c5a10063e2ae87533f252371 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 19 Jun 2020 11:33:10 +0100 Subject: [PATCH] update pocketmine/math dependency --- composer.lock | 8 ++++---- src/entity/Entity.php | 2 +- .../protocol/types/inventory/UseItemTransactionData.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 0ab79499e..53ad2dfb5 100644 --- a/composer.lock +++ b/composer.lock @@ -552,12 +552,12 @@ "source": { "type": "git", "url": "https://github.com/pmmp/Math.git", - "reference": "666175cd9a6561217d436902c666405b790a1a86" + "reference": "d46310a42ab5535296ded0b9368e5642af723f47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/Math/zipball/666175cd9a6561217d436902c666405b790a1a86", - "reference": "666175cd9a6561217d436902c666405b790a1a86", + "url": "https://api.github.com/repos/pmmp/Math/zipball/d46310a42ab5535296ded0b9368e5642af723f47", + "reference": "d46310a42ab5535296ded0b9368e5642af723f47", "shasum": "" }, "require": { @@ -579,7 +579,7 @@ "LGPL-3.0" ], "description": "PHP library containing math related code used in PocketMine-MP", - "time": "2020-06-15T21:21:46+00:00" + "time": "2020-06-19T10:25:24+00:00" }, { "name": "pocketmine/nbt", diff --git a/src/entity/Entity.php b/src/entity/Entity.php index f529db489..bdd7b79f6 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -215,7 +215,7 @@ abstract class Entity{ public function __construct(Location $location, ?CompoundTag $nbt = null){ $this->timings = Timings::getEntityTimings($this); - $this->temporalVector = new Vector3(); + $this->temporalVector = new Vector3(0, 0, 0); if($this->eyeHeight === null){ $this->eyeHeight = $this->height / 2 + 0.1; diff --git a/src/network/mcpe/protocol/types/inventory/UseItemTransactionData.php b/src/network/mcpe/protocol/types/inventory/UseItemTransactionData.php index 17d5ad627..6b59c403c 100644 --- a/src/network/mcpe/protocol/types/inventory/UseItemTransactionData.php +++ b/src/network/mcpe/protocol/types/inventory/UseItemTransactionData.php @@ -87,7 +87,7 @@ class UseItemTransactionData extends TransactionData{ protected function decodeData(PacketSerializer $stream) : void{ $this->actionType = $stream->getUnsignedVarInt(); - $this->blockPos = new Vector3(); + $this->blockPos = new Vector3(0, 0, 0); $stream->getBlockPosition($this->blockPos->x, $this->blockPos->y, $this->blockPos->z); $this->face = $stream->getVarInt(); $this->hotbarSlot = $stream->getVarInt();