Repository navigation
JSON Instruction Format
Files should be located in [...] On the very first line should be
~{buildcraft/json/insn}Everything else must be a function call or a comment. There are 6 different builtin functions: debug, add, remove, replace, overwrite, modify, and alias.
Functions can take 3 different types of arguments: either numbers, strings, or multi-line strings. Numbers cannot contain spaces. Strings must be started and finished with a quote (") Multi-line strings must be started and finished with backticks (`) For example with the function "remove":
remove "buildcraftunofficial:oil"
remove `
buildcraftunofficial:oil
`This function will remove the entry with the given name. This takes 1 argument, the name. For example:
remove "buildcraftunofficial:chipset_diamond"It is probably easiest to find out the name of entries by turning on debugging with debug "all".
This function will add an additional entry with the given name. This either takes 1 argument (the name), or 2 arguments (the name and then the json). For example:
add "item/wrench" `{
"title": "item.wrenchItem.name",
"tag_type": "item",
"tag_subtype": "tool"
}`If the json is missing then it will be loaded from the file specified by the name. For example if the function call is:
add "wrench"And the insn file is in
"assets/buildcraftunofficial/compat/buildcraft/guide.txt"then the wrench guide page will be loaded from
"assets/buildcraftunofficial/compat/buildcraft/guide/item/wrench.md"This function will remove an entry with the first name, and add an entry with the second name but only if the first entry was actually added by something else. This function takes two arguments: the name to remove, and the name to add. This also takes an optional third argument, the json to add. (This acts in exactly the same way as the add function, if you ignore the first argument).
This function acts in a very similar way to the replace function, except that this will inherit the json tags from the removed entry.
For example if we wanted to add a combustion engine fuel recipe for oil and then have an addon mod layer in residue generation as a follow-up modification, we might do it like this:
add "oil" `{
"fuel": {
"id": "buildcraftunofficial:oil", "amount": 4
},
"power": 3
}`Then an entry in the addon mod could look like this:
modify "buildcraftunofficial:oil" "oil" `{
"residue": {
"id": "buildcraftunofficial:oil_residue",
"amount": 2
}
}`Which would result in only a single fuel recipe being added under the modifying mod's namespace, e.g. "myaddon:oil"
{
"fuel": {
"id": "buildcraftunofficial:oil", "amount": 4
},
"residue": {
"id": "buildcraftunofficial:oil_residue",
"amount": 2
},
"power": 3
}(Note: combustion engine fuel recipes aren't configurable this way quite yet - you'll have to wait for the MJ update before this is actually valid)
(TODO: Explanation)
alias "add_fuel" 2 `
add "%0" \`{
"fuel": {
"id": "${domain}:%0"
}
}\`
`(TODO: Explanation)
import "buildcraftunofficial:util"Imported files must start with
~{buildcraft/json/lib}and may optionally include an argument count
~args 3BuildCraft (Unofficial) for Minecraft 26.1 · Repository · Generated from the in-game Guide Book.
Blocks
- Automation
- Engines
- Fluid
- Laser Power
- Mining
- Refining
- Specialized
Items
- Basic
- Chipsets
- Fluid
- Gears
- Paperwork
- Pluggables
- Tools
- Wires
Pipes
-
Item Transport
- Wooden Transport Pipe
- Cobblestone Transport Pipe
- Stone Transport Pipe
- Clay Transport Pipe
- Sandstone Transport Pipe
- Quartz Transport Pipe
- Iron Transport Pipe
- Golden Transport Pipe
- Obsidian Transport Pipe
- Diamond Transport Pipe
- Wooden Diamond Transport Pipe
- Lazuli Transport Pipe
- Emzuli Transport Pipe
- Daizuli Transport Pipe
- Void Transport Pipe
- Stripes Transport Pipe
- Fluid Transport
- Power Transport
- Structure
- FE Transport
Triggers
- Automation
- Basic
- Engines
- Fluid
- Fluid Transport
- Item
- Item Transport
- Pluggables
- Power Delivery
- Pipe Empty
Actions
- Automation
- Basic
- Item Transport
- Pluggables
Concepts & Mechanics
Configuration
- Resource Pack