diff options
| author | mat <git@matdoes.dev> | 2024-12-11 03:25:36 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-11 03:25:36 +0000 |
| commit | 097a620de1a0139ca9a745ddc146c37e1d4695da (patch) | |
| tree | 293a0187f7528afa48aa5ffa7e89acd10841c5ba /azalea-protocol/src/packets/game/c_player_position.rs | |
| parent | 2feef494718009dbcb5c62ef1e58c84c36e8bcbf (diff) | |
| download | azalea-drasl-097a620de1a0139ca9a745ddc146c37e1d4695da.tar.xz | |
fix for latest nightly by changing the FixedBitSet generic to take bytes instead of bits
Diffstat (limited to 'azalea-protocol/src/packets/game/c_player_position.rs')
| -rwxr-xr-x | azalea-protocol/src/packets/game/c_player_position.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-protocol/src/packets/game/c_player_position.rs b/azalea-protocol/src/packets/game/c_player_position.rs index e742df22..c6a2e3f9 100755 --- a/azalea-protocol/src/packets/game/c_player_position.rs +++ b/azalea-protocol/src/packets/game/c_player_position.rs @@ -39,7 +39,7 @@ pub struct RelativeMovements { impl AzaleaRead for RelativeMovements { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { // yes minecraft seriously wastes that many bits, smh - let set = FixedBitSet::<32>::azalea_read(buf)?; + let set = FixedBitSet::<{ 32_usize.div_ceil(8) }>::azalea_read(buf)?; Ok(RelativeMovements { x: set.index(0), y: set.index(1), @@ -56,7 +56,7 @@ impl AzaleaRead for RelativeMovements { impl AzaleaWrite for RelativeMovements { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - let mut set = FixedBitSet::<32>::new(); + let mut set = FixedBitSet::<{ 32_usize.div_ceil(8) }>::new(); let mut set_bit = |index: usize, value: bool| { if value { set.set(index); |
