def test_change_block_at_should_change_id_and_data_correctly(Self): bb = BaseBuilder(level_path=None) x, y, z = [1, 2, 3] block_id = 'id' block_data = 'data' bb.level = Mock() bb.level.setBlockAt = Mock() bb.level.setBlockDataAt = Mock() bb.change_block_at(x=x, y=y, z=z, block_id=block_id, block_data=block_data) bb.level.setBlockAt.assert_called_once_with(x, y, z, block_id) bb.level.setBlockDataAt.assert_called_once_with(x, y, z, block_data)
def testando(block_id=2504, block_data=15): level_path = "/home/arruda/.minecraft_galera/saves/testando/level.dat" init_pos = [-269, 4, 1584] size = [4, 4, 4] x, y, z = init_pos b = BaseBuilder(level_path, init_pos=init_pos, size=size) b.load_level() b.prepare_stage() # block_id = 2504 # block_data = 15 b.change_block_at(x, y, z, block_id, block_data) b.save() return b