aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-03-16 19:01:31 +0000
committermat <git@matdoes.dev>2025-03-16 19:01:31 +0000
commitca2e0b3922da74799be812e5a534a20d611fce1a (patch)
treeeddfab9839d539a31071bb206493bb4a86fbd53e /azalea-core/src
parentb0bd992adcff71ee294dd05060e00e652f62a7b2 (diff)
downloadazalea-drasl-ca2e0b3922da74799be812e5a534a20d611fce1a.tar.xz
entity collisions
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 {