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
TheMustJS 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 theMustJSfiles 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
๐ License
See the repository for license information and additional details.MustJS — Simplifying Create recipe development with KubeJS.