MustJS

A KubeJS add-on that integrates Create mod recipes for seamless automation and customization.

MustJS

MustJS is a KubeJS addon designed to simplify the creation and management of Create mod recipes through a collection of reusable JavaScript functions. The addon provides ready-to-use functions for common Create processing recipes, sequenced assembly, fluid manipulation, and item manipulation, allowing you to create complex recipes with cleaner and more organized scripts.
MustJS is intended to be used as a library for your KubeJS scripts.

๐Ÿ“‚ Structure

The MustJS folder contains all the functions required to create your recipes. You should treat this folder as a library and use its functions inside your recipe scripts.
โš ๏ธ Do not edit the MustJS files directly.
The library is frequently updated, and your changes may be overwritten when updating the addon.

๐Ÿ› ๏ธ Creating Recipes

To create recipes using MustJS, create a new .js file inside your KubeJS recipe scripts and register your recipes using:
ServerEvents.recipes(event => {
    // Your recipes here
})
All MustJS recipe-generation functions require the **`event`** parameter.

Example

js ServerEvents.recipes(event => { compacting( event, itemOutput('minecraft:diamond'), [itemInput('minecraft:coal'), itemInputTag('minecraft:logs')], 'heated' ) })
---

๐Ÿ“œ Functions

CreateBaseFunctions

Functions for creating common Create processing recipes.
Function Description
compacting(e, output, inputs, heat) Creates a compacting recipe
crushing(e, output, input, time) Creates a crushing recipe
cutting(e, output, input, time) Creates a cutting recipe
deploying(e, output, held, base, keep) Creates a deploying recipe
emptying(e, output_item, output_fluid, input) Creates an emptying recipe
filling(e, output, input, fluid) Creates a filling recipe
haunting(e, output, input) Creates a haunting recipe
item_application(e, output, input_block, input_item) Creates an item application recipe
mechanical_crafting(e, output, input, pattern) Creates a mechanical crafting recipe
milling(e, output, input, time) Creates a milling recipe
mixing(e, output, input, heat) Creates a mixing recipe
pressing(e, output, input) Creates a pressing recipe
polishing(e, output, input) Creates a polishing recipe
splashing(e, output, input) Creates a splashing recipe
sequenced_assembly(e, output, input, transitional, loops, processing) Creates a sequenced assembly recipe

โš™๏ธ Sequenced Assembly

MustJS also provides auxiliary functions specifically designed to simplify the creation of Create's Sequenced Assembly recipes.

Auxiliary Processing Functions

js cuttingS(output, input, time) deployingS(output, held, base, keep) fillingS(output, input, fluid) pressingS(output, input)
These functions can be combined inside `sequenced_assembly()` to build complex processing chains.

๐Ÿ’ง FluidManipulator

Functions for easily defining fluid inputs and outputs.

Functions

js fluidOutput(fluid_id, fluid_amount) fluidInput(fluid_id, fluid_amount)
### Example
js fluidInput('minecraft:water', 1000)
---

๐Ÿ“ฆ ItemManipulator

Functions for defining item inputs and outputs.

Output Functions

js itemOutput(id) itemOutputStack(id, count) itemOutputChance(id, chance) itemOutputChanceStack(id, chance, count)
### Input Functions
js itemInput(item) itemInputTag(tag) itemInputKey(symbol, id) itemInputTagKey(symbol, tag)
These functions make it easier to define regular items, item stacks, item tags, and keyed ingredients for recipe generation.

๐Ÿ”ง Example

A basic MustJS recipe script can look like this:
js ServerEvents.recipes(event => {
haunting(
    event,
    itemOutputStack('minecraft:iron_ingot', 12),
    itemInput('minecraft:iron_block')
)
}) ``` MustJS manages the recipe structure, allowing you to focus on what the recipe should produce rather than manually writing the entire creation recipe definition. All functions come with proper documentation and usage explanations, as well as error handling to assist in developing your recipes!

โœจ Features

  • ๐Ÿ› ๏ธ Simplified Create recipe creation
  • ๐Ÿ“ฆ Reusable recipe functions
  • โš™๏ธ Sequenced Assembly support
  • ๐Ÿ’ง Fluid input and output helpers
  • ๐Ÿ“‹ Item manipulation utilities
  • ๐Ÿงฉ Item and tag-based ingredients
  • ๐Ÿ”„ Designed to work directly with KubeJS
  • ๐Ÿงน Cleaner and more organized recipe scripts
  • ๐Ÿš€ Reduces repetitive Create recipe code

๐Ÿ“‹ Requirements

  • KubeJS
  • Create
Make sure both mods are installed and compatible with your Minecraft version.

๐Ÿ“„ License

See the repository for license information and additional details.
MustJS — Simplifying Create recipe development with KubeJS.

The MustJS Team

Forgeborn tier frameprofile avatar
  • 1
    Followers
  • 2
    Projects
  • 325.3K
    Downloads
Donate

More from maougaukken__