Furnace
Link to furnace
CraftTweaker allows you to Add
and Remove
Furnace recipes and change the fuel value of items.
Recipes
Link to recipes
Removal
Link to removal
There are 2 ways to remove Furnace recipes, being:
ZenScript Copyfurnace.remove(IIngredient output)
And
ZenScript Copyfurnace.remove(IIngredient output, IIngredient input);
The first syntax is more flexible with the recipes that are removed and will remove all Furnace recipes that output the output
given.
The second syntax is more strict with the recipes that are removed and will remove all Furnace recipes that output the output
given and has an input of input
.
There also is a third way of removing furnace recipes, though this one will remove ALL furnace recipes registered in the game.
ZenScript Copyfurnace.removeAll();
There are 2 commands for adding furnace recipes:
ZenScript Copyfurnace.addRecipe(IItemStack output, IIngredient input);
And
ZenScript Copyfurnace.addRecipe(IItemStack output, IIngredient input, double xp);
The first syntax will add a Furnace recipe that will give 0 xp on smelt.
The second syntax will add a Furnace recipe that will give xp
xp on smelt.
Fuel
Link to fuel
Set
Link to set
The command for setting fuel values is:
ZenScript Copyfurnace.setFuel(IIngredient input, int burnTime);
This will set the burn value of input
to burnTime
in ticks. Minecraft coal burns for 1600 ticks, 80 seconds, 8 items. 1 item in a minecraft furnace takes 200 ticks to complete.
Setting the burnTime
to 0
will stop the input
from being a fuel item.
Get
Link to get
The command for retrieving an item's fuel value is:
ZenScript Copyfurnace.getFuel(IItemStack item);
This will return the burn value as an Integer
使用例
Link to 使用例
Removal
Link to removal-1
This will remove all Furnace recipes that outputs <minecraft:glass>
.
ZenScript Copyfurnace.remove(<minecraft:glass>);
This will remove all Furnace recipes <minecraft:quartz>
that use <minecraft:quartz_ore>
as an input.
ZenScript Copyfurnace.remove(<minecraft:quartz>, <minecraft:quartz_ore>);
This will add a Furnace recipe that will output a <minecraft:golden_apple>
when a <minecraft:apple>
is smelted.
ZenScript Copyfurnace.addRecipe(<minecraft:golden_apple>, <minecraft:apple>);
This will add a Furnace recipe that will output a <minecraft:speckled_melon>
when a <minecraft:melon>
is smelted and will give the player 1500 xp points.
ZenScript Copyfurnace.addRecipe(<minecraft:speckled_melon>, <minecraft:melon>, 1500);
Fuel
Link to fuel-1
This will set the Fuel value of <minecraft:rotten_flesh>
to 100
.
ZenScript Copyfurnace.setFuel(<minecraft:rotten_flesh>, 100);
Other Functionality
Link to other-functionality
Getting all registered Furnace Recipes
Link to getting-all-registered-furnace-recipes
ZenScript Copyfurnace.all;
Returns a List<IFurnaceRecipe>
.
Get Smelting Result
Link to get-smelting-result
ZenScript Copyfurnace.getSmeltingResult(IItemstack stack);
Returns an IItemStack.