Home Getting Started With Scripts Using this wiki Commands CTGUI Global functions Bracket Handlers
Modtweaker

Kiln

Basic Recipe

  • Adds Kiln Recipe - inputs MUST have a block associated with them.
script.zs
mods.betterwithmods.Kiln.add(IIngredient input, IItemStack[] output);
//Examples
mods.betterwithmods.Kiln.add(<minecraft:fence>,[<minecraft:stick>,<minecraft:stick>]);

Removal by input

  • Remove a recipe based on the input ingredient
script.zs
mods.betterwithmods.Kiln.remove(IIngredient input);

Removal by output

  • Remove a recipe based on the output
script.zs
mods.betterwithmods.Kiln.remove(IItemStack[] outputs);

Remove all

  • Remove all recipes
script.zs
mods.betterwithmods.Kiln.removeAll();

Builder

The Kiln has a recipe builder that allows more precise control over the recipes. All previous methods are simply short cuts to using the builder.

  • To create a new Kiln builder. mods.betterwithmods.Kiln.builder()

  • Kiln methods

    • Sets up the input and outputs of the recipe
      script.zs
      buildRecipe(IIngredient input, IItemStack[] outputs)
    • Set the Heat requirements of the recipe. Heat is used to check if the recipe can be made in a stoked or unstoked cauldron. Unstoked heat = 1, Stoked heat = 2. You can add custom heat sources, and even custom heat levels using the Heat Registry.
      script.zs
      setHeat(int heat)
    • Set the recipe to ignore the heat value and craft anyways
      script.zs
      setIgnoreHeat(boolean ignoreHeat)
    • Finalize the recipe and add it to the game
      script.zs
      build()

Example builder usage

script.zs
mods.betterwithmods.Kiln.builder()
.buildRecipe(<ore:iron>, [<minecraft:iron_ingot>*2])
.setHeat(2)
.build();

Structure Block

The Kiln is a multiblock based on the block it is made of; This allows registering a block that can be used to create the structure.

Input MUST be a Block

script.zs
mods.betterwithmods.Kiln.registerBlock(IItemStack input);
mods.betterwithmods.Kiln.registerBlock(<minecraft:stonebrick>);