Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions feather/base/src/anvil/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ fn read_section_into_chunk(section: &mut LevelSection, chunk: &mut Chunk) -> Res

let chunk_section = ChunkSection::new(blocks, light);

chunk.set_section_at_raw(section.y as isize, Some(chunk_section));
chunk.set_section_at(section.y as isize, Some(chunk_section));

Ok(())
}
Expand All @@ -420,7 +420,7 @@ fn chunk_to_chunk_root(
.map(|(y, mut section)| {
let palette = convert_palette(&mut section);
LevelSection {
y: y as i8,
y: (y as i8) - 1,
states: section
.blocks()
.data()
Expand Down
5 changes: 0 additions & 5 deletions feather/base/src/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,6 @@ impl Chunk {
self.sections[(y + 1) as usize] = section;
}

/// Directly sets the section at index `y` without offseting it. Useful when loading from region files
pub fn set_section_at_raw(&mut self, y: isize, section: Option<ChunkSection>) {
self.sections[y as usize] = section;
}

/// Gets the sections of this chunk.
pub fn sections(&self) -> &[Option<ChunkSection>] {
&self.sections
Expand Down