diff options
Diffstat (limited to 'forward.lua')
| -rw-r--r-- | forward.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/forward.lua b/forward.lua index 0242205..af60f3f 100644 --- a/forward.lua +++ b/forward.lua @@ -1,15 +1,14 @@ local p = peripheral.wrap"back" for i,mod in ipairs{"kinetic","sensor","keyboard"} do - assert(p.hasModule("plethora:"..mod, "need "..mod.."!") + assert(p.hasModule("plethora:"..mod), "need "..mod.."!") end local pitch, yaw = 0,0 local function detector() while true do - local ents = p.sense() local player for i,e in ipairs(p.sense()) do - if e.key == "minecraft:player" and x.name == "ubq323" then - player = x break + if e.key == "minecraft:player" and e.name == "ubq323" then + player = e break end end assert(player, "couldn't find player??") @@ -22,7 +21,7 @@ local function launcher() while true do if not isheld and key == 67 then -- six seve n p.launch(pitch, yaw, 4) end -end +end end print"go" parallel.waitForAny(detector, launcher) |
