mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-26 19:18:12 +01:00
Add Pos#withView(Pos)
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
a2b1148343
commit
81ab4214f2
@ -66,6 +66,11 @@ public record Pos(double x, double y, double z, float yaw, float pitch) implemen
|
|||||||
return new Pos(x, y, z, yaw, pitch);
|
return new Pos(x, y, z, yaw, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Contract(pure = true)
|
||||||
|
public @NotNull Pos withView(@NotNull Pos pos) {
|
||||||
|
return withView(pos.yaw(), pos.pitch());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the yaw and pitch to point
|
* Sets the yaw and pitch to point
|
||||||
* in the direction of the point.
|
* in the direction of the point.
|
||||||
|
Loading…
Reference in New Issue
Block a user