Create: Recipe Hooks
Rank 1,386
Rank 1,041 among mods

Quick rating

Create: Recipe Hooks

Overall rating distribution
1 rating (100%) · 0.5★
1.0★ (no ratings)
1.5★ (no ratings)
2.0★ (no ratings)
2.5★ (no ratings)
3.0★ (no ratings)
3.5★ (no ratings)
4.0★ (no ratings)
4.5★ (no ratings)
5.0★ (no ratings)
0.5★ 5★
Gameplay
0.0
Aesthetics
0.0
Performance
0.0

Create library for recipe-based mods/addons/scripts etc...

API/Library
Mod Loaders
Forge
NeoForge
Fabric
Quilt
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Unsupported
Server Required

About

Project Details

Type
Mod
License
GNU Lesser General Public License v3.0 or later
Latest Version
create-recipe-hooks-fabric-1.1.0.jar
Authors
CurseForge
Modrinth

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Create Recipe Hooks

Create Recipe Hooks is a server-side library for Minecraft 1.20.1 (Forge and Fabric) that fires events whenever a Create machine finishes processing a recipe, and whenever a Create machine processes a world block: Drill mining, Harvester reaping, Saw felling trees. It provides a unified API so that integration mods - such as quest books, automation scripts, and analytics tools - can react to Create production without writing their own mixins.

What it does

The mod hooks into Create's machines at the bytecode level and fires three events:

  • recipeFinished - a Create machine completed a recipe (Basin, Fan, Press, Millstone, Crushing Wheels, Saw, Crafter, Deployer, Spout, Item Drain, Sand Paper, Sequenced Assembly, CEI Printer)
  • blockProcessed - a machine processed a world block: one event per block broken by a Mechanical Drill, per plant cut by a Mechanical Harvester, per lone block cut by a horizontal Mechanical Saw
  • treeCut - a Mechanical Saw felled a whole tree, with the exact log and leaf counts

Every event carries:

  • Source - which machine did the work
  • Player attribution - the UUID of the player who placed the machine (for Crushing Wheels: who threw the item, with a fallback to whoever placed the wheels for belt and hopper input). Persisted across server restarts and carried along inside moving contraptions
  • Recipe ID, item inputs and outputs, fluid outputs - for recipe events
  • Block id, block state, contraption flag, log count - for block events
  • Block position - where it happened in the world

Supported machines

Machine Source constant Event
Basin (Mixing / Compacting) BASIN recipeFinished
Crushing Wheels CRUSHING_WHEEL recipeFinished
Mechanical Saw (recipes) MECHANICAL_SAW recipeFinished
Spout (recipe and bucket filling) SPOUT_FILLING recipeFinished
Millstone MILLSTONE recipeFinished
Mechanical Press (belt and world) MECHANICAL_PRESS recipeFinished
Mechanical Crafter MECHANICAL_CRAFTER recipeFinished
Deployer DEPLOYER_BELT recipeFinished
Encased Fan (belt and world) FAN_BLASTING / FAN_HAUNTING / FAN_SPLASHING / FAN_SMOKING recipeFinished
Item Drain (recipes, buckets, potions) ITEM_DRAIN_EMPTYING recipeFinished
Sand Paper SAND_PAPER recipeFinished
Sequenced Assembly (final step) SEQUENCED_ASSEMBLY recipeFinished
CEI Printer (optional, Forge only) CEI_PRINTER recipeFinished
Mechanical Drill (stationary and contraption) MECHANICAL_DRILL blockProcessed
Mechanical Harvester (contraption) MECHANICAL_HARVESTER blockProcessed
Mechanical Saw, horizontal (stationary and contraption) MECHANICAL_SAW treeCut / blockProcessed

KubeJS scripting, no addons needed

CRH registers its own KubeJS event group. The same scripts run unchanged on Forge and Fabric, with an optional source filter and built-in owner resolution:


CRHEvents.recipeFinished('MILLSTONE', event => {
    const player = event.getOwner();
    if (!player) return;
    player.server.runCommandSilent('give ' + player.name.string + ' minecraft:emerald 1');
});

CRHEvents.treeCut('MECHANICAL_SAW', event => {
    // event.getLogCount(), event.getBlockId(), event.getOwner()
});
  

Ready-to-use script examples (FTB Quests integration, output filtering, per-player counters, drill mining quests, log counting) are available in the README.

Why you might want this

If you are building a quest integration (FTB Quests etc.), you can trigger quest progress the moment a Create machine finishes, attributed to the right player - not just when items land in an inventory. Quests like "smelt 64 iron with a Fan", "mine 500 stone with a Drill" or "fell 50 trees with a Saw" become one short script each.

If you are writing analytics or logging tools for a server, you get a single reliable event stream for all Create production.

This mod does nothing visible on its own. It is a library - you will not see any in-game UI, items, or blocks. Install it when another mod or script requires it. It is server-side: clients without the mod can join a server that has it. For singleplayer, install it in your instance.

Requirements

  • Minecraft 1.20.1
  • Forge file: Forge 47 or newer, Create 6.0.8 or newer. Also runs on NeoForge 1.20.1, verified on clients and dedicated servers
  • Fabric file: Fabric Loader 0.15+, Fabric API, Create Fabric 6.0.8.1 or newer. Works on Quilt
  • KubeJS - optional, only for JS scripting (no EventJS or other addons required)
  • Create Enchantment Industry - optional soft dependency on Forge; CEI Printer events are only fired when CEI is installed

For developers

Register listeners during mod initialization, identical on both loaders:


CreateRecipeHooks.register(ctx -> {
    if (ctx.getSource() == RecipeSource.BASIN) {
        // ctx.getRecipeId(), ctx.getItemOutputs(), ctx.getBlockPos(), ...
    }
});

CreateRecipeHooks.registerBlockProcessed(ctx -> {
    // ctx.getBlockId(), ctx.isContraption(), ctx.getMetadata()
});

CreateRecipeHooks.registerTreeCut(ctx -> {
    // ctx.getLogCount(), ctx.getLeafCount()
});
  

On Forge the events are also posted on the event bus (CreateRecipeFinishedEvent, CreateBlockProcessedEvent, CreateTreeCutEvent); on Fabric they are standard callbacks (CreateRecipeFinishedCallback, CreateBlockProcessedCallback, CreateTreeCutCallback).

A debug mode is available for testing on Forge. Launch with the JVM argument -Dcrh.debug=true to write every recipe completion to logs/crh-events.log.

Full API documentation is available in the per-loader READMEs on the GitHub repository.

License

LGPL-3.0-or-later - free to use in public and private modpacks and as a dependency in other mods. Forks and derivative mods must remain open source under the same license with attribution.

Create Recipe Hooks

Create Recipe Hooks is a server-side library for Minecraft 1.20.1 (Forge and Fabric) that fires events whenever a Create machine finishes processing a recipe, and whenever a Create machine processes a world block: Drill mining, Harvester reaping, Saw felling trees. It provides a unified API so that integration mods - such as quest books, automation scripts, and analytics tools, can react to Create production without writing their own mixins.

What it does

The mod hooks into Create's machines at the bytecode level and fires three events:

  • recipeFinished - a Create machine completed a recipe (Basin, Fan, Press, Millstone, Crushing Wheels, Saw, Crafter, Deployer, Spout, Item Drain, Sand Paper, Sequenced Assembly, CEI Printer)
  • blockProcessed - a machine processed a world block: one event per block broken by a Mechanical Drill, per plant cut by a Mechanical Harvester, per lone block cut by a horizontal Mechanical Saw
  • treeCut - a Mechanical Saw felled a whole tree, with the exact log and leaf counts

Every event carries:

  • Source - which machine did the work
  • Player attribution - the UUID of the player who placed the machine (for Crushing Wheels: who threw the item, with a fallback to whoever placed the wheels for belt and hopper input). Persisted across server restarts and carried along inside moving contraptions
  • Recipe ID, item inputs and outputs, fluid outputs - for recipe events
  • Block id, block state, contraption flag, log count - for block events
  • Block position - where it happened in the world

Supported machines

Machine Source constant Event
Basin (Mixing / Compacting)BASINrecipeFinished
Crushing WheelsCRUSHING_WHEELrecipeFinished
Mechanical Saw (recipes)MECHANICAL_SAWrecipeFinished
Spout (recipe and bucket filling)SPOUT_FILLINGrecipeFinished
MillstoneMILLSTONErecipeFinished
Mechanical Press (belt and world)MECHANICAL_PRESSrecipeFinished
Mechanical CrafterMECHANICAL_CRAFTERrecipeFinished
DeployerDEPLOYER_BELTrecipeFinished
Encased Fan (belt and world)FAN_BLASTING / FAN_HAUNTING / FAN_SPLASHING / FAN_SMOKINGrecipeFinished
Item Drain (recipes, buckets, potions)ITEM_DRAIN_EMPTYINGrecipeFinished
Sand PaperSAND_PAPERrecipeFinished
Sequenced Assembly (final step)SEQUENCED_ASSEMBLYrecipeFinished
CEI Printer (optional, Forge only)CEI_PRINTERrecipeFinished
Mechanical Drill (stationary and contraption)MECHANICAL_DRILLblockProcessed
Mechanical Harvester (contraption)MECHANICAL_HARVESTERblockProcessed
Mechanical Saw, horizontal (stationary and contraption)MECHANICAL_SAWtreeCut / blockProcessed

KubeJS scripting, no addons needed

CRH registers its own KubeJS event group. The same scripts run unchanged on Forge and Fabric, with an optional source filter and built-in owner resolution:


CRHEvents.recipeFinished('MILLSTONE', event => {
    const player = event.getOwner();
    if (!player) return;
    player.server.runCommandSilent('give ' + player.name.string + ' minecraft:emerald 1');
});

CRHEvents.treeCut('MECHANICAL_SAW', event => {
    // event.getLogCount(), event.getBlockId(), event.getOwner()
});
  

Ready-to-use script examples (FTB Quests integration, output filtering, per-player counters, drill mining quests, log counting) are available in the README.

Why you might want this

If you are building a quest integration (FTB Quests etc.), you can trigger quest progress the moment a Create machine finishes, attributed to the right player - not just when items land in an inventory. Quests like "smelt 64 iron with a Fan", "mine 500 stone with a Drill" or "fell 50 trees with a Saw" become one short script each.

If you are writing analytics or logging tools for a server, you get a single reliable event stream for all Create production.

This mod does nothing visible on its own. It is a library - you will not see any in-game UI, items, or blocks. Install it when another mod or script requires it. It is server-side: clients without the mod can join a server that has it. For singleplayer, install it in your instance.

Requirements

  • Minecraft 1.20.1
  • Forge file: Forge 47 or newer, Create 6.0.8 or newer. Also runs on NeoForge 1.20.1, verified on clients and dedicated servers
  • Fabric file: Fabric Loader 0.15+, Fabric API, Create Fabric 6.0.8.1 or newer. Works on Quilt
  • KubeJS - optional, only for JS scripting (no EventJS or other addons required)
  • Create Enchantment Industry - optional soft dependency on Forge; CEI Printer events are only fired when CEI is installed

For developers

Register listeners during mod initialization, identical on both loaders:


CreateRecipeHooks.register(ctx -> {
    if (ctx.getSource() == RecipeSource.BASIN) {
        // ctx.getRecipeId(), ctx.getItemOutputs(), ctx.getBlockPos(), ...
    }
});

CreateRecipeHooks.registerBlockProcessed(ctx -> {
    // ctx.getBlockId(), ctx.isContraption(), ctx.getMetadata()
});

CreateRecipeHooks.registerTreeCut(ctx -> {
    // ctx.getLogCount(), ctx.getLeafCount()
});
  

On Forge the events are also posted on the event bus (CreateRecipeFinishedEvent, CreateBlockProcessedEvent, CreateTreeCutEvent); on Fabric they are standard callbacks (CreateRecipeFinishedCallback, CreateBlockProcessedCallback, CreateTreeCutCallback).

A debug mode is available for testing on Forge. Launch with the JVM argument -Dcrh.debug=true to write every recipe completion to logs/crh-events.log.

Full API documentation is available in the per-loader READMEs on the GitHub repository.

License

LGPL-3.0-or-later - free to use in public and private modpacks and as a dependency in other mods. Forks and derivative mods must remain open source under the same license with attribution.

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

1
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Total Downloads
CurseForge
<1,000
Modrinth
<1,000
Last Updated
CurseForge
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works