diff options
| author | Shayne Hartford <shaybox@shaybox.com> | 2024-11-30 19:05:35 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-30 18:05:35 -0600 |
| commit | ea5a1c1ec128cc1a33593c9d91ef758c3fb73e16 (patch) | |
| tree | a118ec0a95af962da70d5df7ad1028813d2883a1 /azalea-protocol | |
| parent | 944fe5c6f888ebdcb7354cc5e6ab6a7414daec99 (diff) | |
| download | azalea-drasl-ea5a1c1ec128cc1a33593c9d91ef758c3fb73e16.tar.xz | |
Add missing world border boolean to use item on packet in 1.21.2 (#192)
Diffstat (limited to 'azalea-protocol')
| -rwxr-xr-x | azalea-protocol/src/packets/game/s_use_item_on.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/azalea-protocol/src/packets/game/s_use_item_on.rs b/azalea-protocol/src/packets/game/s_use_item_on.rs index 0ad23ad2..4c87cb72 100755 --- a/azalea-protocol/src/packets/game/s_use_item_on.rs +++ b/azalea-protocol/src/packets/game/s_use_item_on.rs @@ -27,8 +27,10 @@ pub struct BlockHit { /// network, this is transmitted as the difference between the location and /// block position. pub location: Vec3, - /// Whether the player's head is inside of a block. + /// Whether the player's head is inside a block. pub inside: bool, + /// Whether the player's hitting the world border. + pub world_border: bool, } impl AzaleaWrite for BlockHit { @@ -48,6 +50,7 @@ impl AzaleaWrite for BlockHit { buf, )?; self.inside.azalea_write(buf)?; + self.world_border.azalea_write(buf)?; Ok(()) } } @@ -60,6 +63,7 @@ impl AzaleaRead for BlockHit { let cursor_y = f32::azalea_read(buf)?; let cursor_z = f32::azalea_read(buf)?; let inside = bool::azalea_read(buf)?; + let world_border = bool::azalea_read(buf)?; Ok(Self { block_pos, direction, @@ -69,6 +73,7 @@ impl AzaleaRead for BlockHit { z: f64::from(block_pos.z) + f64::from(cursor_z), }, inside, + world_border, }) } } |
