aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-core/src')
-rwxr-xr-xazalea-core/src/position.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs
index 5d923d39..2dea1471 100755
--- a/azalea-core/src/position.rs
+++ b/azalea-core/src/position.rs
@@ -125,6 +125,16 @@ macro_rules! vec3_impl {
z: self.z,
}
}
+
+ pub fn with_x(&self, x: $type) -> Self {
+ Self { x, ..*self }
+ }
+ pub fn with_y(&self, y: $type) -> Self {
+ Self { y, ..*self }
+ }
+ pub fn with_z(&self, z: $type) -> Self {
+ Self { z, ..*self }
+ }
}
impl Add for &$name {