Class

import mods.pyrotech.Bloomery;

Methods

static void removeAllBloomeryRecipes();

static void removeAllWitherForgeRecipes();

static void removeBloomeryRecipes(
  IIngredient output // the output ingredients to match
);

Recipes that have an output that matches any of the given ingredients will be removed.


static void removeWitherForgeRecipes(
  IIngredient output // the output ingredients to match
);

Recipes that have an output that matches any of the given ingredients will be removed.


static Bloomery createBloomeryBuilder(
  string name,                // the name of the recipe - should be unique
  IItemStack output,          // the output item received from the bloom
  IIngredient input,          // the recipe input
  @Optional boolean inherited // true if the recipe should be inherited
);

Creates and returns a new bloomery recipe builder.


static Bloomery createWitherForgeBuilder(
  string name,       // the name of the recipe - should be unique
  IItemStack output, // the output item received from the bloom
  IIngredient input  // the recipe input
);

Creates and returns a new wither forge recipe builder.


static void addBloomeryFuelModifier(
  IIngredient fuel,
  double modifier  
);

static void addWitherForgeFuelModifier(
  IIngredient fuel,
  double modifier  
);

static void setBloomGameStages(
  Stages stages // game stages
);

Sets game stage logic required to use the bloom.


static void setBloomeryGameStages(
  Stages stages // game stages
);

Sets game stage logic required to use the bloomery.


static void setWitherForgeGameStages(
  Stages stages // game stages
);

Sets game stage logic required to use the wither forge.


Bloomery setBurnTimeTicks(
  int burnTimeTicks // the base time in ticks to produce a bloom
);

Sets the base time in ticks that this recipe takes to produce a bloom. This value is further modified by fuel level and airflow.


Bloomery setExperience(
  float experience // the total experience produced by a bloom
);

Sets the total experience rewarded for hammering on the bloom.


Bloomery setFailureChance(
  float failureChance // the recipe's failure chance
);

Sets the recipe's chance to fail and produce an item from the recipe's failure items. This is applied to items received from hammering a bloom.


Bloomery setBloomYield(
  int min, // the minimum output yield
  int max  // the maximum output yield
);

Sets the random range for the total number of output items produced by hammering a bloom.


Bloomery setSlagItem(
  IItemStack slagItem, // the item to use as slag
  int slagCount        // the amount of slag produced in-world during processing
);

Sets the slag item and the amount of in-world slag produced during operation.


Bloomery addFailureItem(
  IItemStack itemStack, // the failure item
  int weight            // the weight
);

Adds a weighted item to the list of items chosen as a failure item.


Bloomery setLangKey(
  string langKey // the lang key
);

The lang key provided here will be used to construct the display name of the output bloom. If this parameter is omitted, the recipe will use the lang key of the input item.

When more than one lang key is provided, separated by a semicolon ;, the first lang key is resolved, then passed into the next lang key and so on.

For example, if supplied with the parameter tile.oreIron;item.pyrotech.slag.unique, tile.oreIron will first be resolved to Iron Ore before being passed into item.pyrotech.slag.unique, resulting in Iron Ore Slag, which is then passed into tile.pyrotech.bloom.unique.name and ultimately resolved to Iron Ore Slag Bloom.

NOTE: The '.name' suffix is added internally and should not be included here.


Bloomery setAnvilTiers(
  string[] tiers // valid enums: granite, ironclad
);

Provide an array of granite and / or ironclad. Anvil recipe inheritance does not apply to bloom recipes. That means recipes created for the granite anvil will not be inherited by the ironclad anvil. A bloom recipe's anvil tier must be set here.


void register();

This must be called on the builder last to actually register the recipe defined in the builder.


Examples

The following two recipes are the same recipes that Pyrotech uses for Iron Ore Blooms and Iron Ore Slag Blooms.

import mods.pyrotech.Bloomery;

// recipe for an iron bloom from an iron ore
Bloomery.createBloomeryBuilder(
        "bloom_from_iron_ore",   // recipe name
        <minecraft:iron_nugget>, // output
        <minecraft:iron_ore>     // input
    )
    .setAnvilTiers(["granite", "ironclad"])
    .setBurnTimeTicks(28800)
    .setFailureChance(0.25)
    .setBloomYield(12, 15)
    .setSlagItem(<pyrotech:generated_slag_iron>, 4)
    .addFailureItem(<pyrotech:slag>, 1)
    .addFailureItem(<pyrotech:generated_slag_iron>, 2)
    .register();

// recipe for an iron slag bloom from an iron slag pile
Bloomery.createBloomeryBuilder(
        "bloom_from_iron_slag",             // recipe name
        <minecraft:iron_nugget>,            // output
        <pyrotech:generated_pile_slag_iron> // input
    )
    .setAnvilTiers(["granite", "ironclad"])
    .setBurnTimeTicks(14400)
    .setFailureChance(0.25)
    .setBloomYield(12, 15)
    .setSlagItem(<pyrotech:generated_slag_iron>, 2)
    .addFailureItem(<pyrotech:rock:0>, 1)
    .addFailureItem(<pyrotech:slag>, 2)
    .setLangKey("tile.oreIron;item.pyrotech.slag.unique")
    .register();