From ffc6d10401f009819ace9dbd97aeceb586475e59 Mon Sep 17 00:00:00 2001 From: Sascha Martens Date: Thu, 12 Nov 2020 21:25:57 +0100 Subject: [PATCH] Changed al place functions were the same. Had to rename them --- Modules/circles.lua | 4 ++-- Modules/modules.lua | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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