From eeaf1435e81d9cbd8daa0efa22029c1f259a64b5 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 24 Mar 2026 11:15:56 -0500 Subject: 26.1 (#316) * start updating to 26.1 * start updating to 26.1-snapshot-6 * 26.1-snapshot-6 * 26.1-snapshot-10 * 26.1-rc-1 * fix tests * 26.1-rc-2 and sort default components * 26.1 * update changelog --- azalea-world/src/chunk/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'azalea-world/src') diff --git a/azalea-world/src/chunk/mod.rs b/azalea-world/src/chunk/mod.rs index cd52026a..48cb202c 100644 --- a/azalea-world/src/chunk/mod.rs +++ b/azalea-world/src/chunk/mod.rs @@ -44,6 +44,10 @@ pub struct Section { /// This may be updated every time [`Self::get_and_set_block_state`] is /// called. pub block_count: u16, + /// Similar to [`Self::block_count`], but for fluids. + /// + /// Unlike [`Self::block_count`], this is currently not updated by Azalea. + pub fluid_count: u16, pub states: PalettedContainer, pub biomes: PalettedContainer, } @@ -178,6 +182,7 @@ pub fn get_block_state_from_sections( impl AzBuf for Section { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let block_count = u16::azalea_read(buf)?; + let fluid_count = u16::azalea_read(buf)?; // this is commented out because the vanilla server is wrong // TODO: ^ this comment was written ages ago. needs more investigation. @@ -200,12 +205,14 @@ impl AzBuf for Section { let biomes = PalettedContainer::::read(buf)?; Ok(Section { block_count, + fluid_count, states, biomes, }) } fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { self.block_count.azalea_write(buf)?; + self.fluid_count.azalea_write(buf)?; self.states.write(buf)?; self.biomes.write(buf)?; Ok(()) @@ -289,6 +296,7 @@ mod tests { let biomes = PalettedContainer::new(); let section = Section { block_count: 2, + fluid_count: 0, states, biomes, }; -- cgit v1.2.3