turtle.refuel

From ComputerCraft Wiki
Revision as of 12:03, 4 February 2013 by Immibis (Talk | contribs)

Jump to: navigation, search


Grid Redstone.png  Function turtle.refuel
Fills the turtle with fuel.
Syntax turtle.refuel(count)
Returns boolean true if fuel, else false.
Part of ComputerCraft
API turtle

Examples

Grid paper.png  Example
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 520 IndustrialCraft
Scrap 15 IndustrialCraft
Coalfuel Can 1520 IndustrialCraft
Wooden Scaffolding 15 IndustrialCraft
Peat 80 Forestry
Sugar Cane 0 Vanilla
Wooden Tools 10 Vanilla
Lava 1000 Vanilla
Blaze Rod 120 Vanilla
Wood Blocks 15 Vanilla
Sticks 5 Vanilla
Coal/Charcoal 80 Vanilla
Mushroom Blocks 15 Vanilla
Coal Coke 320 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.

1.48:

Formula changed to ((fuel * 5) / 100)

Trivia