diff --git a/Modules/circles.lua b/Modules/circles.lua index 3c2b73e..f079dbc 100644 --- a/Modules/circles.lua +++ b/Modules/circles.lua @@ -49,7 +49,7 @@ end --place_row() places n block in a row -function place_column(amount, material) +function place_row(amount, material) turtle.turnRight() turtle.forward() turtle.turnLeft() @@ -62,7 +62,7 @@ end --place_triangle() places a trinagular block -function place_column(material) +function place_triangle(material) turtle.turnRight() turtle.forward() turtle.turnLeft() diff --git a/Modules/modules.lua b/Modules/modules.lua index 2cfc220..1bae75a 100644 --- a/Modules/modules.lua +++ b/Modules/modules.lua @@ -40,7 +40,8 @@ function count_inventory(minecraft_id) local total = 0 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) end end