TL;DR

Create a SpcNodeCategory with a namespaced ID and display name. Pass it to SpcNodeRegistry.register(). Nodes with the same category are grouped together in the palette.

On This Page

What Are Categories?

In the LOGO editor, the left-side palette shows all available nodes grouped by category. Each category has a header (like "Basic Logic", "Timers", "I/O") and contains the nodes that belong to it.

When you register a node, you pass a category. All nodes registered with the same SpcNodeCategory instance (or the same categoryId) appear under the same header.

Node Palette ▸ Basic Logic AND · OR · NOT · XOR ▸ Timers On-Delay · Off-Delay · Pulse ▸ My Sensors ← your addon! Temp Sensor · Humidity · Light ▸ Create: Rotational ← your addon!

Creating a Category

A category is just a record with an ID and a display name:

// Simplest form — default sort order (5000), no custom icon
public static final SpcNodeCategory MY_SENSORS =
    new SpcNodeCategory("mymod:sensors", "My Sensors");

Then pass it when registering nodes:

SpcNodeRegistry.register(TEMP_SENSOR_SCHEMA, new TempSensorFactory(), MY_SENSORS);
SpcNodeRegistry.register(HUMIDITY_SCHEMA,    new HumidityFactory(),    MY_SENSORS);
SpcNodeRegistry.register(LIGHT_SCHEMA,       new LightFactory(),       MY_SENSORS);
// All three appear under the "My Sensors" header in the palette
💡 Namespace your category ID
Use "yourmod:category_name" to avoid collisions with other addons or built-in categories.

Controlling Sort Order

Categories are displayed in the palette sorted by their sortOrder value. Lower numbers appear first.

// Appears early in the palette (before most built-in categories)
new SpcNodeCategory("mymod:sensors", "My Sensors", 500)

// Appears late in the palette (after built-in categories)
new SpcNodeCategory("mymod:advanced", "Advanced", 8000)

Sort order ranges

RangeUsed by
0 – 1000Built-in SPC categories (I/O, Logic, Timers, etc.)
1001 – 4999Good range for addons that want to appear near built-in categories
5000Default sort order (if you don't specify one)
5001+Addons that want to appear at the end of the palette

Custom Icons

You can give your category a custom icon that appears next to the header in the palette. Pass a resource location string pointing to a texture file:

// Category with a custom icon texture
new SpcNodeCategory(
    "create:rotational",                     // category ID
    "Create: Rotational",                    // display name
    2000,                                    // sort order
    "create:textures/gui/cogwheel_icon.png"  // icon texture path
)

Icon details

💡 No icon? That's fine
Categories without icons still display normally — they just show the text header. Icons are purely cosmetic for visual distinction.

Built-in Categories

SPC ships with these built-in categories (you cannot modify them, but you can add nodes to them if appropriate):

CategorySort OrderContains
I/O100Digital inputs, digital outputs, analog I/O, FE I/O
Basic Logic200AND, OR, NOT, XOR, NAND, NOR
Special Logic300Comparators, multiplexers, demultiplexers
Timers400On-delay, off-delay, pulse timers
Counters500Up counter, down counter, up/down counter
Math600Add, subtract, multiply, divide, modulo, min, max
Analog700Analog thresholds, amplifiers, limiters
Memory800Latches, shift registers, marker flags
Display900Message text, block labels
Sensors950Time, weather, light, entity detection
Effects1000Sound, particle, chat message triggers

Multiple Categories per Addon

If your addon adds many nodes, split them into multiple categories. This keeps the palette organized and helps players find what they need.

// A Create mod addon might define several categories:
public static final SpcNodeCategory CREATE_ROTATIONAL =
    new SpcNodeCategory("create:rotational", "Create: Rotational", 2000,
        "create:textures/gui/cogwheel.png");

public static final SpcNodeCategory CREATE_FLUID =
    new SpcNodeCategory("create:fluid", "Create: Fluid", 2100,
        "create:textures/gui/fluid_pipe.png");

public static final SpcNodeCategory CREATE_LOGISTICS =
    new SpcNodeCategory("create:logistics", "Create: Logistics", 2200);

// Register nodes into the appropriate category:
SpcNodeRegistry.register(ROTATION_SENSOR, new RotSensorFactory(), CREATE_ROTATIONAL);
SpcNodeRegistry.register(STRESS_GAUGE,    new StressFactory(),    CREATE_ROTATIONAL);
SpcNodeRegistry.register(FLUID_LEVEL,     new FluidFactory(),    CREATE_FLUID);
SpcNodeRegistry.register(BELT_COUNTER,    new BeltFactory(),     CREATE_LOGISTICS);

Full Example: Create Addon Categories

Here's a complete @Mod constructor showing how a Create addon would organize its nodes into categories:

@Mod("spc_create")
public class SpcCreateAddon {

    // ── Categories ──
    static final SpcNodeCategory ROTATIONAL =
        new SpcNodeCategory("spc_create:rotational", "Create: Rotational", 2000,
            "spc_create:textures/gui/cogwheel.png");

    static final SpcNodeCategory FLUID =
        new SpcNodeCategory("spc_create:fluid", "Create: Fluid", 2100);

    public SpcCreateAddon(IEventBus modEventBus) {
        // Check API version compatibility
        if (SpcApi.API_VERSION < 3) {
            LOGGER.warn("SPC API is too old! Expected 1.1.2, found v{}", SpcApi.API_VERSION);
            return;
        }

        // Register rotational nodes
        SpcNodeRegistry.register(RPM_SENSOR_SCHEMA,    new RpmSensorFactory(),    ROTATIONAL);
        SpcNodeRegistry.register(STRESS_SENSOR_SCHEMA, new StressSensorFactory(), ROTATIONAL);
        SpcNodeRegistry.register(SPEED_CTRL_SCHEMA,    new SpeedCtrlFactory(),    ROTATIONAL);

        // Register fluid nodes
        SpcNodeRegistry.register(TANK_LEVEL_SCHEMA,    new TankLevelFactory(),   FLUID);
        SpcNodeRegistry.register(FLOW_RATE_SCHEMA,     new FlowRateFactory(),    FLUID);
    }
}

Best Practices