Fixed entity yaw and pitch

Fixed number value type during calculation of entity yaw & pitch
This commit is contained in:
Tasuku Bobcorn 2022-12-15 17:47:46 +08:00 committed by GitHub
parent 1d0066f1d8
commit 1a47eddb8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,8 +128,8 @@ namespace MinecraftClient.Mapping
Health = 1.0f;
Equipment = new Dictionary<int, Item>();
Item = new Item(ItemType.Air, 0, null);
Yaw = yaw * (1 / 256) * 360; // to angle in 360 degree
Pitch = pitch * (1 / 256) * 360;
Yaw = yaw * (1F / 256) * 360; // to angle in 360 degree
Pitch = pitch * (1F / 256) * 360;
ObjectData = objectData;
}
@ -151,8 +151,8 @@ namespace MinecraftClient.Mapping
Health = 1.0f;
Equipment = new Dictionary<int, Item>();
Item = new Item(ItemType.Air, 0, null);
Yaw = yaw * (1 / 256) * 360; // to angle in 360 degree
Pitch = pitch * (1 / 256) * 360;
Yaw = yaw * (1F / 256) * 360; // to angle in 360 degree
Pitch = pitch * (1F / 256) * 360;
}
public string GetTypeString()