Class

import mods.pyrotech.Worktable;

Methods

static Worktable buildShaped(
  IItemStack output,         
  IIngredient[][] ingredients
);

static Worktable buildShapeless(
  IItemStack output,       
  IIngredient[] ingredients
);

static void addShaped(
  @Nullable string name,     
  IItemStack output,         
  IIngredient[][] ingredients
);

If the name parameter is null, a name will be generated.


static void addShaped(
  @Nullable string name,             
  IItemStack output,                 
  IIngredient[][] ingredients,       
  @Nullable IIngredient tool,        
  int toolDamage,                    
  @Optional boolean mirrored,        
  @Optional boolean hidden,          
  @Optional IRecipeFunction function,
  @Optional IRecipeAction action,    
  @Optional Stages gamestages        
);

If the name parameter is null, a name will be generated. If the tool parameter is null, the recipe will default to using the hammers provided in the config and will ignore the toolDamage parameter.


static void addShapeless(
  @Nullable string name,   
  IItemStack output,       
  IIngredient[] ingredients
);

If the name parameter is null, a name will be generated.


static void addShapeless(
  @Nullable string name,             
  IItemStack output,                 
  IIngredient[] ingredients,         
  @Nullable IIngredient tool,        
  int toolDamage,                    
  @Optional boolean hidden,          
  @Optional IRecipeFunction function,
  @Optional IRecipeAction action,    
  @Optional Stages gamestages        
);

If the name parameter is null, a name will be generated. If the tool parameter is null, the recipe will default to using the hammers provided in the config and will ignore the toolDamage parameter.


static void blacklistVanillaRecipes(
  string[] resourceLocations
);

static void blacklistAllVanillaRecipes();

Blacklist all crafting recipes except recipes added with CraftTweaker.


static void whitelistVanillaRecipes(
  string[] resourceLocations
);

static void removeRecipes(
  IIngredient output // output ingredient to match
);

Removes pre-existing recipes, ie. recipes added by the mod.


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

Sets game stage logic required to use the worktable.


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

Sets game stage logic required to use the stone worktable.


Worktable setName(
  string name
);

Worktable setTool(
  IIngredient tool,
  int toolDamage   
);

Worktable setMirrored(
  boolean mirrored
);

Worktable setHidden(
  boolean hidden
);

Worktable setRecipeFunction(
  IRecipeFunction recipeFunction
);

Worktable setRecipeAction(
  IRecipeAction recipeAction
);

Worktable setRecipeGameStages(
  Stages stages
);

void register();

Examples

import mods.pyrotech.Worktable;

Worktable.addShaped("custom_recipe_name", <minecraft:furnace>, [
  [<minecraft:cobblestone>, <minecraft:cobblestone>, <minecraft:cobblestone>],
  [<minecraft:cobblestone>, null, <minecraft:cobblestone>],
  [<minecraft:cobblestone>, <minecraft:cobblestone>, <minecraft:cobblestone>]]);

// Builder examples:

// bare-bones
Worktable.buildShaped(<minecraft:furnace>, [
  [<minecraft:cobblestone>, <minecraft:cobblestone>, <minecraft:cobblestone>],
  [<minecraft:cobblestone>, null, <minecraft:cobblestone>],
  [<minecraft:cobblestone>, <minecraft:cobblestone>, <minecraft:cobblestone>]])
  .register();

// custom name, custom tools
Worktable.buildShaped(<minecraft:furnace>, [
  [<minecraft:cobblestone>, <minecraft:cobblestone>, <minecraft:cobblestone>],
  [<minecraft:cobblestone>, null, <minecraft:cobblestone>],
  [<minecraft:cobblestone>, <minecraft:cobblestone>, <minecraft:cobblestone>]])
  .setName("custom_recipe_name")
  .setTool(<minecraft:iron_pickaxe> | <minecraft:diamond_pickaxe>, 10)
  .register();

// bare-bones with gamestages

import mods.pyrotech.Stages;

Worktable.buildShaped(<minecraft:furnace>, [
  [<minecraft:cobblestone>, <minecraft:cobblestone>, <minecraft:cobblestone>],
  [<minecraft:cobblestone>, null, <minecraft:cobblestone>],
  [<minecraft:cobblestone>, <minecraft:cobblestone>, <minecraft:cobblestone>]])
  .setRecipeGameStages(Stages.and(["a", "b"]))
  .register();