From 6935030e0c7d76afb4250b2a3ecdf6d8fc69c394 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 12 Dec 2019 00:20:09 +0000 Subject: [PATCH] entity: use 0 for no-target a la vanilla 1.13, fix player arms bug I have no idea why this was changed, -1 is still used for every other property, but packet traces confirm this is correct. --- src/entity/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity/Entity.php b/src/entity/Entity.php index ef32fb6da..1d0fc3937 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -1785,7 +1785,7 @@ abstract class Entity{ $this->networkProperties->setFloat(EntityMetadataProperties::SCALE, $this->scale); $this->networkProperties->setLong(EntityMetadataProperties::LEAD_HOLDER_EID, -1); $this->networkProperties->setLong(EntityMetadataProperties::OWNER_EID, $this->ownerId ?? -1); - $this->networkProperties->setLong(EntityMetadataProperties::TARGET_EID, $this->targetId ?? -1); + $this->networkProperties->setLong(EntityMetadataProperties::TARGET_EID, $this->targetId ?? 0); $this->networkProperties->setString(EntityMetadataProperties::NAMETAG, $this->nameTag); $this->networkProperties->setString(EntityMetadataProperties::SCORE_TAG, $this->scoreTag);