Masterful Machinery
  • 👋MM Docs
  • 💡Base Features & Config
    • Controllers
    • Ports
      • Item Ports
      • Fluid Ports
      • Energy Ports
      • Mekanism Ports (Compat)
        • Gas Ports
        • Slurry Ports
        • Pigment Ports
        • Infusion Ports
      • Create Kinetic (Compat)
      • PneumaticCraft Air (Compat)
    • Extra Blocks
    • Structures
      • Structure Requirements
      • Common Requirements
    • Process Recipes
      • Ingredient Configs
      • Input Entries
      • Output Entries
      • Recipe Conditions
  • 🔩Compat Features
    • KubeJS Support
      • Register Controller
      • Register Port
      • Register Extra Blocks
      • Create Structures
      • Create Process Recipes
  • Tutorial Guides
    • Step by Step Datapack Edition
  • General Help
    • 🪞Custom Textures
  • 🎥Gallery
    • Coke Oven
  • 📎Archived Versions
    • Deprecated 1.16 Versions
    • Deprecated 1.18-1.19 Versions
      • Data Packs
Powered by GitBook
On this page
  1. Compat Features
  2. KubeJS Support

Register Extra Blocks

Register Extra Blocks with KubeJS Startup Scripts

PreviousRegister PortNextCreate Structures

Last updated 11 months ago

Startup Script

MMEvents.registerExtraBlocks(event => {
    event.create("my_vent")
        .type("mm:vent")
        .name("My Vent")
})

To register extra blocks in KubeJS, you can call MMEvents.registerExtraBlocks.

NOTE: all functions will map to the fields of the

The create function takes a string parameter which maps directly to the extra block's "id" field and returns a builder to set the rest of the fields for the extra block.

The type function takes a string parameter which maps directly to the extra block's "type" field.

The name function takes a string paramter which maps directly to the extra block's "name" field.

🔩
Extra Blocks Json