View difference between Paste ID: b41CEjhU and mXjGRqbW
SHOW: | | - or go back to the newest paste.
1
--Ender Fuel--
2
3
local args = { ... }
4
5
if args[1] == nil or args[2] == nil or turtle.getItemCount(args[1]) < 1 or turtle.getItemCount (args[2]) < 1 or args[1] == "help" then
6-
	print("Usage: enderfuel [chest slot] [fuel slot])
6+
	print("Usage: enderfuel [chest slot] [fuel slot]")
7-
	print("Place an ender chest with fuel in the chest slot)
7+
	print("Place an ender chest with fuel in the chest slot")
8
	print("and the fuel you will be using in the fuel slot.")
9
	return
10
end
11
12
if  then
13
	print(
14
15
function placeUp()
16
	while not turtle.placeUp() do
17
		turtle.digUp()
18
		turtle.attackUp()
19
	end
20
end
21
22
function enderRefuel()
23
	turtle.select(args[1])
24
	placeUp()
25
	turtle.select(args[2])
26
	turtle.suckUp(63)
27
	sleep(1)
28
	turtle.refuel(1)
29
	turtle.select(args[2])
30
	turtle.digUp()
31
	turtle.select(16)
32
end
33
34
function normalRefuel()
35
	turtle.select(args[2])
36
	turtle.refuel(1)
37
	turtle.select(16)
38
end
39
40
if turtle.getItemCount(args[2]) < 2 then
41
	enderRefuel()
42
	else
43
	normalRefuel()
44
end