Getting Started

Chisel provides full KubeJS integration, allowing modpack makers to create, modify, and remove carving groups through server scripts.

Note: All Chisel KubeJS scripts should be placed in kubejs/server_scripts/ as they run during server/datapack reload.

Quick Start

Create a new file at kubejs/server_scripts/chisel_tweaks.js:

// Listen to the Chisel carving groups event
ChiselEvents.modifyGroups(event => {
    // Your modifications here
    event.create('my_custom_group')
        .add('minecraft:stone')
        .add('minecraft:andesite')
});

Events

ChiselEvents.modifyGroups

Server-side event that fires during datapack reload. Use this to modify, create, or remove carving groups.

Type: Server Script

Fires: On server start and /reload

ChiselEvents.modifyGroups(event => {
    // event: ModifyCarvingGroupsEvent
});

API Reference

ModifyCarvingGroupsEvent

The main event object passed to the modifyGroups callback.

Method Description Returns
get(groupId) Get or create a carving group builder CarvingGroupBuilder
create(groupId) Alias for get() - creates or modifies a group CarvingGroupBuilder
remove(groupId) Remove an entire carving group ModifyCarvingGroupsEvent
removeFromAll(blockId) Remove a block from ALL carving groups ModifyCarvingGroupsEvent
hasGroup(groupId) Check if a group exists or is being created boolean
getGroupIds() Get all group IDs being modified String[]
Group ID Format: Use 'chisel:groupname' format or just 'groupname' (defaults to chisel namespace).

CarvingGroupBuilder

Builder for modifying individual carving groups. All methods return the builder for chaining.

Method Description
add(blockId) Add a single block to the group
addAll(blockIds[]) Add multiple blocks at once
remove(blockId) Remove a single block from the group
removeAll(blockIds[]) Remove multiple blocks at once
clear() Clear all existing blocks before adding new ones
replace(blockIds[]) Replace entire group with specified blocks
Block ID Format: Use 'modid:blockname' or just 'blockname' (defaults to minecraft namespace).

Examples

Creating a New Carving Group

Create a custom group to chisel between different stone variants:

ChiselEvents.modifyGroups(event => {
    // Create a new carving group for all stone types
    event.create('all_stones')
        .add('minecraft:stone')
        .add('minecraft:granite')
        .add('minecraft:diorite')
        .add('minecraft:andesite')
        .add('minecraft:deepslate')
        .add('minecraft:tuff');
});

Adding Blocks to an Existing Group

Add modded blocks to Chisel's existing carving groups:

ChiselEvents.modifyGroups(event => {
    // Add Create mod limestone to Chisel's limestone group
    event.get('chisel:carving/limestone')
        .add('create:limestone');

    // Add Quark marble to Chisel's marble group
    event.get('chisel:carving/marble')
        .add('quark:marble');
});

Removing Blocks from Groups

Remove specific blocks from carving groups:

ChiselEvents.modifyGroups(event => {
    // Remove polished variants from andesite group
    event.get('chisel:carving/andesite')
        .remove('minecraft:polished_andesite');

    // Remove a block from ALL groups at once
    event.removeFromAll('minecraft:cobblestone');
});

Replacing an Entire Group

Completely replace the contents of a carving group:

ChiselEvents.modifyGroups(event => {
    // Replace the iron group with only specific blocks
    event.get('chisel:carving/iron')
        .replace([
            'minecraft:iron_block',
            'chisel:iron/plate',
            'chisel:iron/tiles'
        ]);
});

Removing an Entire Group

Completely disable a carving group:

ChiselEvents.modifyGroups(event => {
    // Remove the diamond carving group entirely
    event.remove('chisel:carving/diamond');

    // Remove multiple groups
    event.remove('chisel:carving/emerald');
    event.remove('chisel:carving/gold');
});

Using addAll for Multiple Blocks

Add multiple blocks efficiently using arrays:

ChiselEvents.modifyGroups(event => {
    // Create a terracotta carving group with all colors
    event.create('terracotta')
        .addAll([
            'minecraft:terracotta',
            'minecraft:white_terracotta',
            'minecraft:orange_terracotta',
            'minecraft:magenta_terracotta',
            'minecraft:light_blue_terracotta',
            'minecraft:yellow_terracotta',
            'minecraft:lime_terracotta',
            'minecraft:pink_terracotta',
            'minecraft:gray_terracotta',
            'minecraft:light_gray_terracotta',
            'minecraft:cyan_terracotta',
            'minecraft:purple_terracotta',
            'minecraft:blue_terracotta',
            'minecraft:brown_terracotta',
            'minecraft:green_terracotta',
            'minecraft:red_terracotta',
            'minecraft:black_terracotta'
        ]);
});

Complete Modpack Example

A comprehensive example showing multiple modifications:

// kubejs/server_scripts/chisel_modpack_tweaks.js

ChiselEvents.modifyGroups(event => {
    // === Add mod compatibility ===

    // Create mod integration
    event.get('chisel:carving/limestone')
        .add('create:limestone');

    // Quark integration
    event.get('chisel:carving/marble')
        .add('quark:marble');

    // === Create custom groups ===

    // Nether stone variants
    event.create('nether_stones')
        .addAll([
            'minecraft:netherrack',
            'minecraft:blackstone',
            'minecraft:basalt',
            'minecraft:smooth_basalt'
        ]);

    // End stone variants
    event.create('end_stones')
        .add('minecraft:end_stone')
        .add('minecraft:end_stone_bricks')
        .add('minecraft:purpur_block');

    // === Balance tweaks ===

    // Disable diamond chiseling (too OP for our pack)
    event.remove('chisel:carving/diamond');

    // Remove cobblestone from stone group
    event.get('chisel:carving/cobblestone')
        .remove('minecraft:cobblestone');
});

Global Bindings

Chisel provides a global Chisel binding with utility methods and constants.

Chisel Binding

Property / Method Description Value
Chisel.MOD_ID The Chisel mod ID "chisel"
Chisel.SOUND_WOOD Wood chiseling sound constant ChiselSound
Chisel.SOUND_DIRT Dirt chiseling sound constant ChiselSound
Chisel.SOUND_FALLBACK Default chiseling sound constant ChiselSound
Chisel.SOUND_STONECUTTER Stonecutter chiseling sound constant ChiselSound
Chisel.id(path) Create a Chisel resource location "chisel:{path}"
Chisel.carvingTag(name) Create a carving group tag ID "chisel:carving/{name}"

Using Bindings

ChiselEvents.modifyGroups(event => {
    // Use the helper to create the tag ID
    let tagId = Chisel.carvingTag('my_group');
    // tagId = "chisel:carving/my_group"

    event.get(tagId)
        .add('minecraft:stone');

    // Create a chisel resource location
    let blockId = Chisel.id('marble/raw');
    // blockId = "chisel:marble/raw"
});