Modular controller official Chinese documentation Modular Controller

This tutorial is set by the author to use the CC By-NC-SA protocol.

Customized controller

For modifications provided by the controller block itself, see the following example.

 {{

"Registryname": "japanese_barbecue_stall",

"LocalizedName": "Japanese Barbecue Stall",

"Controller": {

"FullBlock": False, // Whether the controller is the complete square

"Alphaenabled": True, // Whether the material is allowed to be translucent

"Name": "japanese_barbecue_stall", // Customized controller registration name

"Translationkey": "Tile.modularController.japanese_barbecue_stall.name", //

"LightValue": 15 // Customize the brightness of the controller block

},

"Modifiers": []

}

Crafttweaker event

onmachineRecipestart

Guide package: Import Mods.modularController.machinerecipestartEvent;

*This incident can be canceled*

Zengetter

Method name Return type description POSIBLOCKPOS

Get the controller coordinates in IBLOCKPOS format .WORLDIWORLD

Get IWORLD

recipeid

string

Get the ID of the executable formula ("ModularMachinery:" Start) .machineidString

Get the ID of the machine that executes the formula ("ModularMachinery:"+Machine Registration Name).

Zensetter

Method name description Setfailed (String Message) failed to execute the formula (cancel the event, does not output the product), and sends a failure of failure.

onmachinerecipeComplete

Guide package: Import Mods.modularController.machinerecipeCompleteEvent;*This incident must

Zengetter

Method name Return type description POSIBLOCKPOS

Get the controller coordinates in IBLOCKPOS format .WORLDIWORLD

Get IWORLD

recipeid

string

Get the ID of the executable formula ("ModularMachinery:" Start) .machineidString

Get the ID of the machine that executes the formula ("ModularMachinery:"+Machine Registration Name).

Molding


Add "Activated_Sound" element to the JSON file corresponding to the corresponding machine.

All /CT SoundEvents output can be used.

The sound effect added by this module:

 ModularController: Machine_activated_industry

ModularController: Machine_activated_Science_fiction

ModularController: Machine_activated_steam

Example:

 {{

"Registryname": "japanese_barbecue_stall",

"LocalizedName": "Placeholder", "Placeholder",

"Activated_sound": "ModularController: Machine_Activated_sclence_Fiction",

"Color": "535353",

"Parts": []

}

Custom models and materials


*To use this function, you need to install the ResourceSLoader module.*

Blockstates

Enter .minecraft/Resources/ModularController/Blockstates/folders, find the JSON file corresponding to the registered machine registration name.

 {{

"Forge_marker": 1,

"Defaults": {

"Model": "Modid: Filenamedefault" // Box is placed in the world when it is placed in the world

},

"Variants": {

"FACING = NORTH": {

"Model": "MODID: Filenamenorth" // The model used to place north when the block is placed northward

},

"FACING = SOUTH": {"Model": "Modid: Filenamesouth", // The model used when placed south

"Y": 180

},

"FACING = WEST": {

"Model": "MODID: Filenamewest", // The model used by the square facing the east

"Y": 270

},

"Facing = East": {

"Model": "MODID: Filenameeast", // The model used by the block to place when placed west

"Y": 90

},

"Inventory": [[

{{

"Transform": "Forge: DEFAULT-BLOCK" // The model used in the item bar

}

]

}

}

"Model": "Modid: Filenamedefault" actually points to .minecraft/Resources/Modid/BLOCK/FILENAMEDEFAULT.JSON, "Modid" and "FILENAME" can be changed with their preferences.

Model

Open the corresponding model file, the following is an example:

 {{

"Textures": {

"All": "Modid: Blocks/Testmmall", // The actual point to .minecraft/resources/modid/textures/blocks/testmmmall.png, the following is the same as the same reason.

"North": "Modid: Blocks/Testmmnorth", "

"East": "MODID: Blocks/Testmmeast", "South": "Modid: Blocks/TestmmMMMMSOUTH",

"WEST": "Modid: blocks/testmmwest",,

"Up": "Modid: BLOCKS/TESTMMUP",

"DOWN": "Modid: Blocks/Testmmdown",,

},

"Elements": [// The model and UV data of a whole block, please do not change the custom model

{{

"From": [0, 0, 0],,,

"To": [16, 16, 16],,

"Faces": {

"North": {"uv": [0, 0, 16, 16], "Texture": "#0"},

"East": {"uv": [0, 0, 16, 16], "Texture": "#0"},

"SOUTH": {"uv": [0, 0, 16, 16], "Texture": "#0"},

"West": {"uv": [0, 0, 16, 16], "Texture": "#0"}, "up": {"uv": [0, 0, 16, 16], "texturere":#0"},

"DOWN": {"uv": [0, 0, 16, 16], "Texture": "#0"}

}

},

{{

"From": [0, 0, 0],,,

"To": [16, 16, 16],,

"Faces": {

"North": {"uv": [0, 0, 16, 16], "Texture": "#north"},

"East": {"uv": [0, 0, 16, 16], "Texture": "#east"},

"SOUTH": {"uv": [0, 0, 16, 16], "Texture": "#South"}, "West": {"uv": [0, 0, 16, 16], "Texturere": #West"},

"Up": {"uv": [0, 0, 16, 16], "texture": "#up"},

"DOWN": {"uv": [0, 0, 16, 16], "Texture": "#down"}

}

}

]

}