mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Fixed arrow flight and spawning bugs, fixed critical trail, close #420
This commit is contained in:
@ -2620,8 +2620,9 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
new DoubleTag("", cos($this->yaw / 180 * M_PI) * cos($this->pitch / 180 * M_PI))
|
||||
]),
|
||||
"Rotation" => new ListTag("Rotation", [
|
||||
new FloatTag("", $this->yaw),
|
||||
new FloatTag("", $this->pitch)
|
||||
//yaw/pitch for arrows taken crosswise, not along the arrow shaft.
|
||||
new FloatTag("", ($this->yaw > 180 ? 360 : 0) - $this->yaw), //arrow yaw must range from -180 to +180
|
||||
new FloatTag("", -$this->pitch)
|
||||
]),
|
||||
"Fire" => new ShortTag("Fire", $this->isOnFire() ? 45 * 60 : 0)
|
||||
]);
|
||||
|
Reference in New Issue
Block a user