Skip to content

Commit

Permalink
Reformatted
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlegiantJGC committed Oct 9, 2024
1 parent 4fdec0f commit a0477b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/amulet/level/abc/_chunk_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ def _preload(self) -> None:
# The history system is not aware of the chunk. Load from the level data
chunk: Chunk
try:
raw_chunk = self._get_raw_dimension().get_raw_chunk(self.cx, self.cz)
raw_chunk = self._get_raw_dimension().get_raw_chunk(
self.cx, self.cz
)
chunk = self._get_raw_dimension().raw_chunk_to_native_chunk(
raw_chunk,
self.cx,
Expand Down Expand Up @@ -292,7 +294,10 @@ def _set(self, chunk: ChunkT | None) -> None:
old_chunk_class = None
new_chunk_class = type(chunk)
component_data = chunk.serialise_chunk()
if old_chunk_class != new_chunk_class and None in component_data.values():
if (
old_chunk_class != new_chunk_class
and None in component_data.values()
):
raise RuntimeError(
"When changing chunk class all the data must be present."
)
Expand Down

0 comments on commit a0477b6

Please sign in to comment.