your current location:首页 > news>Altar synthetic formula editor guide

Altar synthetic formula editor guide

2024-12-10 17:54:37|Myriagame |source:minecraft skins

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

Open the behavior package of this module, and the synthesis table of the altar is defined in the "Scripts/Recipes" directory.To add a new synthetic table, you only need to refer to the following instructions to add and modify the file:

1. Create a definition file: Create a new JS file in the recipe directory. It is recommended to copy the existing files to avoid some unknown errors.Such as "craft_hakurei_gohei.js"

2. Define materials and products

The material is specified in the "Ingredients" object, including two types: "tag" and "item".When "TAG", all items that meet this TAG can be identified as synthetic materials; when it is "Item", the name of the item is consistent with the definition.

The consumption Power is specified by "Power", which can be any two decimals of 0 to 5.

When the product is specified in the "output" object, when "Minecraft: Item" is specified, it represents the production of the item.

3. Update the introduction interface

① Open the index.js in the recipe directory and add a line of code:

Import {recipe as } from "./craft/ "

can be arbitrarily used by other synthetic tables, is the name of the file created in the first step.

② Added one in the "Recipelist" array: .

4. Define the item label (optional)

The item tag is a name of multiple items. Open the file "tag_define.js", and add it according to the existing definition.

Note that at present, you can only edit the synthetic formula by modifying the behavior package, so each update module must open the behavior package and revise it.