Pyrotech

Pyrotech

897k Downloads

Specify different tools for the worktable

MasterEnderman opened this issue ยท 5 comments

commented

possible implementations:

static void addShaped( string name, IItemStack output, IIngredient[][] ingredients, IIngredient tool, int tooldamage, IRecipeFunction function, IRecipeAction action);

I'm asking for it, because I want to use the worktable as a very basic artisan worktable where you have to use the right tool to complete the recipe.

commented

Vanilla recipes, recipes with a null tool, will still use the Hammers and tool damage defined in the config.

Custom recipes will allow IIngredient tool and int damage parameters.

  • Remove existing 6 zen methods: addShaped, addShapedMirrored, and addShapeless
  • Add the zen methods:
static WorktableBuilder buildShaped(IItemStack output, IIngredient[][] ingredients);

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

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

static void addShapeless(
  @Nullable string name,
  IItemStack output,
  IIngredient[] ingredients,
  @Nullable IIngredient tool,
  int toolDamage,
  @Optional(default=false) boolean mirrored,
  @Optional IRecipeFunction function,
  @Optional IRecipeAction action
);
  • Create builder methods:
import mods.pyrotech.WorktableBuilder;

WorktableBuilder setName(string name);

WorktableBuilder setTool(IIngredient tool, int toolDamage);

WorktableBuilder setMirrored(boolean isMirrored);

WorktableBuilder setFunction(IRecipeFunction func);

WorktableBuilder setAction(IRecipeAction action);

void register();
  • Create zen doc for builder
  • Modify zen doc for changed Worktable methods

JEI will indicate the required tool for the recipe.

  • Create custom IRecipeWrapper to render tool and damage
  • Modify existing category to supply recipe tool and damage

Table TE interaction will check tool against recipe tool.

  • Code check logic in interaction

Mod will expose Patchouli template for worktable recipe with tool.

  • Create / expose template

How will the player be informed that they are banging on the table with the wrong tool?

commented

Just generate green particles if it's a valid recipe and smoke particles if something is wrong. You can also add a sound affect to make it more noticeable.
Particles and sound are only generated / played if the player right clicks the worktable.

commented

I like the idea of the smoke particles. The mod already uses increased smoke particles to indicate campfire food is about to fail, so it's kinda cohesive.

commented

I think I also like the idea of using the green, bone-meal particles to indicate progress. The player already associates the green particles with advancement and progress because of crop growth, so I think it would convey the same message of progress.

The smoke and / or growth particles might also be used to indicate:

  • wrong tool / right tool for both anvils
  • (?) compacting bin progress

The particles should have a config option to disable.

commented

The feature is merged in the master branch and will be available in 1.1.0