Difference between revisions of "Turtle.refuel"
From ComputerCraft Wiki
(→Fuel Values: Added Charcoal to the Coal line) |
(→Fuel Values: bamboo is vanilla) |
||
| Line 37: | Line 37: | ||
| Wooden Scaffolding | | Wooden Scaffolding | ||
| 18 | | 18 | ||
| − | |||
| − | |||
| − | |||
| − | |||
| IndustrialCraft | | IndustrialCraft | ||
|- | |- | ||
| Line 46: | Line 42: | ||
| 96 | | 96 | ||
| Forestry | | Forestry | ||
| + | |- | ||
| + | | Sugar Cane | ||
| + | | 0 | ||
| + | | Vanilla | ||
|- | |- | ||
| Wooden Tools | | Wooden Tools | ||
Revision as of 22:36, 25 October 2012
| Fills the turtle with fuel. | |
| Syntax | turtle.refuel(count) |
| Returns | boolean true if fuel, else false. |
| Part of | ComputerCraft |
| API | turtle |
Examples
| Fills the turtle with fuel | |
| Code |
turtle.refuel( 4 ) |
| Output | Tries to refuel with up to 4 items, 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 |
| Wooden Scaffolding | 18 | IndustrialCraft |
| Peat | 96 | Forestry |
| Sugar Cane | 0 | Vanilla |
| Wooden Tools | 12 | Vanilla |
| Lava | 1200 | Vanilla |
| Blaze Rod | 144 | Vanilla |
| Wood Blocks | 18 | Vanilla |
| Sticks | 6 | Vanilla |
| Coal/Charcoal | 96 | Vanilla |
| Mushroom Blocks | 18 | Vanilla |
| Coal Coke | 192 | Railcraft |
1.41:
The formula for calculating the movement gain from a fuel is "((fuel / 100) * 6)". Where fuel is the items burn time in ticks in a regular furnace and "/" is integer division.
1.42+:
Formula changed to ((fuel *6) / 100). This will give more accurate movement values.
Trivia
1.41:
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.