mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-29 15:07:36 +02:00
Fixed with* methods in Pos (#495)
This commit is contained in:
parent
ba76e746a2
commit
b6bce86eca
@ -180,7 +180,7 @@ public final class Pos implements Point {
|
|||||||
@Override
|
@Override
|
||||||
@Contract(pure = true)
|
@Contract(pure = true)
|
||||||
public @NotNull Pos withX(@NotNull DoubleUnaryOperator operator) {
|
public @NotNull Pos withX(@NotNull DoubleUnaryOperator operator) {
|
||||||
return new Pos(operator.applyAsDouble(x), y, z);
|
return new Pos(operator.applyAsDouble(x), y, z, yaw, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -192,7 +192,7 @@ public final class Pos implements Point {
|
|||||||
@Override
|
@Override
|
||||||
@Contract(pure = true)
|
@Contract(pure = true)
|
||||||
public @NotNull Pos withY(@NotNull DoubleUnaryOperator operator) {
|
public @NotNull Pos withY(@NotNull DoubleUnaryOperator operator) {
|
||||||
return new Pos(x, operator.applyAsDouble(y), z);
|
return new Pos(x, operator.applyAsDouble(y), z, yaw, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -204,7 +204,7 @@ public final class Pos implements Point {
|
|||||||
@Override
|
@Override
|
||||||
@Contract(pure = true)
|
@Contract(pure = true)
|
||||||
public @NotNull Pos withZ(@NotNull DoubleUnaryOperator operator) {
|
public @NotNull Pos withZ(@NotNull DoubleUnaryOperator operator) {
|
||||||
return new Pos(x, y, operator.applyAsDouble(z));
|
return new Pos(x, y, operator.applyAsDouble(z), yaw, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user