elytra fly tweak
This commit is contained in:
@@ -4,8 +4,10 @@ local Sound = require('sound')
|
|||||||
|
|
||||||
local modules = _G.peripheral.wrap('back')
|
local modules = _G.peripheral.wrap('back')
|
||||||
local os = _G.os
|
local os = _G.os
|
||||||
|
local parallel = _G.parallel
|
||||||
|
|
||||||
while true do
|
local function run()
|
||||||
|
while true do
|
||||||
local meta = modules.getMetaOwner()
|
local meta = modules.getMetaOwner()
|
||||||
|
|
||||||
if not meta.isSneaking and meta.isElytraFlying then
|
if not meta.isSneaking and meta.isElytraFlying then
|
||||||
@@ -29,4 +31,20 @@ while true do
|
|||||||
else
|
else
|
||||||
os.sleep(0.4)
|
os.sleep(0.4)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
parallel.waitForAny(
|
||||||
|
function()
|
||||||
|
print('press any key to exit')
|
||||||
|
os.pullEvent('char')
|
||||||
|
end,
|
||||||
|
function()
|
||||||
|
while true do
|
||||||
|
print('Starting')
|
||||||
|
local s, m = pcall(run)
|
||||||
|
print(m)
|
||||||
|
print('Waiting for 5 seconds before restarting')
|
||||||
|
os.sleep(5)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user