refactor + cleanup

This commit is contained in:
kepler155c
2017-10-27 20:25:16 -04:00
parent 9939c75fc3
commit d97a9d7468
17 changed files with 261 additions and 299 deletions

View File

@@ -12,6 +12,11 @@ function Builder:begin()
local last = #self.schematic.blocks
local throttle = Util.throttle()
local cx, cy, cz = commands.getBlockPosition()
if self.loc.x then
cx, cy, cz = self.loc.rx, self.loc.ry, self.loc.rz
end
if self.mode == 'destroy' then
direction = -1
last = 1
@@ -32,12 +37,10 @@ function Builder:begin()
end
local function placeBlock(bid, dmg, x, y, z)
local cx, _, cz = commands.getBlockPosition()
local command = table.concat({
"setblock",
cx + x + 1,
"~" .. y,
cy + y,
cz + z + 1,
bid,
dmg,