diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2026-03-24 11:15:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-24 11:15:56 -0500 |
| commit | eeaf1435e81d9cbd8daa0efa22029c1f259a64b5 (patch) | |
| tree | 3486e26d5409708370e4e259d240fb77c6e1e439 /azalea-world/src | |
| parent | 41a9ae6aaff77646c08c64ac1334a8cc6081c24f (diff) | |
| download | azalea-drasl-eeaf1435e81d9cbd8daa0efa22029c1f259a64b5.tar.xz | |
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
Diffstat (limited to 'azalea-world/src')
| -rw-r--r-- | azalea-world/src/chunk/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<BlockState>, pub biomes: PalettedContainer<Biome>, } @@ -178,6 +182,7 @@ pub fn get_block_state_from_sections( impl AzBuf for Section { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { 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::<Biome>::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, }; |
