New method for getting looking location (#1503)

* New method for getting looking location

* improve
This commit is contained in:
ReinforceZwei 2021-03-13 22:23:58 +08:00 committed by GitHub
parent 240468ad22
commit 90505dbc4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 98 additions and 12 deletions

View file

@ -410,7 +410,7 @@ namespace MinecraftClient.Protocol.Handlers
if (living)
{
byte entityHeadPitch = ReadNextByte(cache);
entityPitch = ReadNextByte(cache);
}
else
{
@ -421,7 +421,7 @@ namespace MinecraftClient.Protocol.Handlers
short velocityY = ReadNextShort(cache);
short velocityZ = ReadNextShort(cache);
return new Entity(entityID, entityType, new Location(entityX, entityY, entityZ));
return new Entity(entityID, entityType, new Location(entityX, entityY, entityZ), entityYaw, entityPitch);
}
/// <summary>