Skip to content

BazZziliuS/CraftJS

Repository files navigation

CraftJS

A utility mod for Minecraft 1.21.1 (NeoForge) that adds recipe editor workbenches with KubeJS code export capability.

Русская версия

Features

  • Visual Recipe Editor — place items in a 3x3 grid and get ready-to-use KubeJS code
  • Shaped and Shapeless Recipes — switch with a single button
  • Tag Support — Shift+click on a slot to toggle between specific item and tag
  • Recipe Override — easily replace existing recipes with auto-generated ID
  • Result Display — result item is displayed above the block for quick identification
  • Addon API — extensible system for adding support for other recipe types

Usage

Note: This is an admin block, available only in creative mode or via commands.

  1. Get CraftJS Workbench in creative mode (CraftJS tab) or with /give @s craftjs:craftjs_workbench
  2. Place items in the 3x3 crafting grid
  3. Put the result in the slot on the right
  4. Select recipe type (Shaped/Shapeless)
  5. Toggle New/Override to replace existing recipes
  6. Use Shift+Click on slots to switch to tag mode if needed
  7. Click Copy — the code will be copied to clipboard

Generated Code Examples

Shaped recipe:

ServerEvents.recipes(event => {
    event.shaped(
        Item.of('minecraft:diamond_pickaxe'),
        [
            'DDD',
            ' S ',
            ' S '
        ],
        {
            D: 'minecraft:diamond',
            S: 'minecraft:stick'
        }
    )
})

Shapeless recipe:

ServerEvents.recipes(event => {
    event.shapeless(
        Item.of('minecraft:flint_and_steel'),
        [
            'minecraft:iron_ingot',
            'minecraft:flint'
        ]
    )
})

With tags:

ServerEvents.recipes(event => {
    event.shaped(
        Item.of('minecraft:chest'),
        [
            'PPP',
            'P P',
            'PPP'
        ],
        {
            P: '#minecraft:planks'
        }
    )
})

Override existing recipe:

ServerEvents.recipes(event => {
    event.shaped(
        Item.of('minecraft:diamond_pickaxe'),
        [
            'DDD',
            ' S ',
            ' S '
        ],
        {
            D: 'minecraft:diamond',
            S: 'minecraft:stick'
        }
    ).id('minecraft:diamond_pickaxe')
})

Requirements

  • Minecraft 1.21.1
  • NeoForge 21.1.x
  • (Optional) KubeJS for using generated recipes

Installation

  1. Install NeoForge for Minecraft 1.21.1
  2. Place the mod JAR file in the mods folder
  3. Launch the game

Addon Development

See ADDON_DEVELOPMENT.md for detailed documentation on creating addons.

License

All Rights Reserved

Author

BazZziliuS

About

The mod adds special recipe editor workbenches that allow you to visually create crafts and automatically export them to KubeJS code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages