Difference between revisions of "Turtle.refuel"
From ComputerCraft Wiki
(Updated info with formula and trivia) |
|||
Line 28: | Line 28: | ||
|- | |- | ||
| Scrap | | Scrap | ||
− | | | + | | 18 |
| IndustrialCraft | | IndustrialCraft | ||
|- | |- | ||
Line 60: | Line 60: | ||
|- | |- | ||
| Sugar Cane | | Sugar Cane | ||
− | | | + | | 0 |
| Vanilla | | Vanilla | ||
|- | |- | ||
Line 71: | Line 71: | ||
| Vanilla | | Vanilla | ||
|} | |} | ||
+ | |||
+ | The formula for calculating the movement gain from a fuel is "((fuel * 6) / 100)". | ||
+ | Where fuel is the items burn time in ticks in a regular furnace and "/" is integer division. | ||
+ | |||
+ | == Trivia == | ||
+ | |||
+ | Due to the formula using integer division items with a burn time of X.5 seconds will ignore that .5 second. This makes sugarcanes yield 0 movement and scrap to yield 18 where it should have given 21. |
Revision as of 16:03, 30 August 2012
Function turtle.refuel | |
Fills the turtle with fuel. | |
Syntax | turtle.refuel() |
Returns | boolean true if fuel, else false. |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
Fills the turtle with fuel | |
Code |
turtle.refuel() |
Output | Tries to consume the item, returns true if it is a fuel and false if not. |
Fuel Values
Fuel values for different items.
Item | Movement gained | Added by |
---|---|---|
Biofuel Can | 624 | IndustrialCraft |
Scrap | 18 | IndustrialCraft |
Coalfuel Can | 1824 | IndustrialCraft |
Peat | 96 | Forestry |
Wooden Tools | 12 | Vanilla |
Lava | 1200 | Vanilla |
Blaze Rod | 144 | Vanilla |
Wood Blocks | 18 | Vanilla |
Sticks | 6 | Vanilla |
Sugar Cane | 0 | Vanilla |
Coal | 96 | Vanilla |
Mushroom Blocks | 18 | Vanilla |
The formula for calculating the movement gain from a fuel is "((fuel * 6) / 100)". Where fuel is the items burn time in ticks in a regular furnace and "/" is integer division.
Trivia
Due to the formula using integer division items with a burn time of X.5 seconds will ignore that .5 second. This makes sugarcanes yield 0 movement and scrap to yield 18 where it should have given 21.