Skip to content
This repository has been archived by the owner on May 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from coiax/correct-yield-on-empty
Browse files Browse the repository at this point in the history
💨 Change empty section behaviour when streaming
  • Loading branch information
matcool committed Apr 17, 2020
2 parents 2d41822 + 96758f7 commit c7892e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion anvil/chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def get_block(self, x: int, y: int, z: int, section: Union[int, nbt.TAG_Compound

# If its an empty section its most likely an air block
if section is None or section.get('BlockStates') is None:
return Block.from_name('minecraft:air')
for i in range(4096):
yield Block.from_name("minecraft:air")

# Number of bits each block is on BlockStates
# Cannot be lower than 4
Expand Down

0 comments on commit c7892e9

Please sign in to comment.