Skip to content

.Json File

theblackswitch edited this page May 15, 2026 · 2 revisions

Inorder to register your multiblock, you create a simple json file in your namespace under data/<namespace>/multiblock. The json file should have the following structure:

Basic Structure

root
┣ id*: the id of your multiblock. You'll use this later
┣ structure*: A refrence to a structure file
┣ anchor_mode*: determines the rotation anchor for this multiblock. Can be center, corner
┣ place_mode*: determines how the multiblock is placed when positioned. Can be one of center, corner, facing
┣ callback*: Various different commands that get run during events within the multiblock.
┃┣ on_place
┃┣ on_complete
┃┣ on_edit
┃┣ on_creative_place
┃┣ on_clear_area
┃┗ on_uncomplete
┗ conditions*: Additional conditions that all need to pass inorder for the multiblock to complete. Required but can be empty
 ┗ condition: A command that must return a success value inorder to complete. Runs as and at the root
* required

Callback

All callbacks run as and at the root of your multiblock instance. They are a string field that contain a command (not a function).

  • on_place: Runs everytime a new instance is summoned. Can be used to init your multiblock instance
  • on_complete: Runs once a multiblock instance is fully completed (additional conditions are also required)
  • on_edit: Runs when the multiblock blueprint is modified. This can be due to a rotate, move, show/hide... Can be used to handle custom display placement
  • on_creative_place: Runs when the multiblock's build_structure function is called. This can be used to handle the placement of custom blocks
  • on_clear_area: Runs when the multiblock's clear_area function is called. This can be used to handle the removal of custom blocks
  • on_uncomplete: Runs when the multiblock changes from a completed state to an incomplete state. This can be used for example to disable the functionality of your multiblock

Clone this wiki locally