mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
avoid type juggling in conditions, always use explicit boolean conditions
This commit is contained in:
@ -424,9 +424,9 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
new DoubleTag("", $pos->z)
|
||||
]),
|
||||
new ListTag("Motion", [
|
||||
new DoubleTag("", $motion ? $motion->x : 0.0),
|
||||
new DoubleTag("", $motion ? $motion->y : 0.0),
|
||||
new DoubleTag("", $motion ? $motion->z : 0.0)
|
||||
new DoubleTag("", $motion !== null ? $motion->x : 0.0),
|
||||
new DoubleTag("", $motion !== null ? $motion->y : 0.0),
|
||||
new DoubleTag("", $motion !== null ? $motion->z : 0.0)
|
||||
]),
|
||||
new ListTag("Rotation", [
|
||||
new FloatTag("", $yaw),
|
||||
|
Reference in New Issue
Block a user