Skip to content

Commit 655abc3

Browse files
committed
Return old block data from Dimension.set_block()
1 parent dc93384 commit 655abc3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spockbot/plugins/tools/smpmap.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,10 @@ def set_block(self, pos_or_x, y=None, z=None,
256256

257257
if data is None:
258258
data = (block_id << 4) | (meta & 0x0F)
259+
260+
old_data = chunk.block_data.get(rx, ry, rz)
259261
chunk.block_data.set(rx, ry, rz, data)
262+
return old_data >> 4, old_data & 0x0F
260263

261264
def get_block_entity_data(self, pos_or_x, y=None, z=None):
262265
"""

0 commit comments

Comments
 (0)