Skip to content

Commit

Permalink
Return old block data from Dimension.set_block()
Browse files Browse the repository at this point in the history
  • Loading branch information
Gjum committed Feb 1, 2016
1 parent dc93384 commit 655abc3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spockbot/plugins/tools/smpmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ def set_block(self, pos_or_x, y=None, z=None,

if data is None:
data = (block_id << 4) | (meta & 0x0F)

old_data = chunk.block_data.get(rx, ry, rz)
chunk.block_data.set(rx, ry, rz, data)
return old_data >> 4, old_data & 0x0F

def get_block_entity_data(self, pos_or_x, y=None, z=None):
"""
Expand Down

0 comments on commit 655abc3

Please sign in to comment.