Changed al place functions were the same. Had to rename them

This commit is contained in:
Sascha Martens 2020-11-12 21:25:57 +01:00
parent cf41150a10
commit ffc6d10401
2 changed files with 4 additions and 3 deletions

View File

@ -49,7 +49,7 @@ end
--place_row() places n block in a row --place_row() places n block in a row
function place_column(amount, material) function place_row(amount, material)
turtle.turnRight() turtle.turnRight()
turtle.forward() turtle.forward()
turtle.turnLeft() turtle.turnLeft()
@ -62,7 +62,7 @@ end
--place_triangle() places a trinagular block --place_triangle() places a trinagular block
function place_column(material) function place_triangle(material)
turtle.turnRight() turtle.turnRight()
turtle.forward() turtle.forward()
turtle.turnLeft() turtle.turnLeft()

View File

@ -40,7 +40,8 @@ function count_inventory(minecraft_id)
local total = 0 local total = 0
for slot = 1, 16 do for slot = 1, 16 do
if turtle.getItemDetail(slot) == 'minecraft:' .. minecraft_id then item = turtle.getItemDetail(slot)
if item ~= nil and item['name'] == 'minecraft:' .. minecraft_id then
total = total + turtle.getItem(slot) total = total + turtle.getItem(slot)
end end
end end