Create a fool -style tutorial [Ref] Requious Frakto Minecraft Game

Requious Frakto (hereinafter referred to as REF) as a powerful MOD that can easily create unilateral machines, but there are fewer related documents, so I write this tutorial to allow more people to use Ref to realize what they want what they wantFunction.

I have limited ability, and if there are errors, please point out.

1. Preparation

Please confirm that you installed Resource Loader and Crafttweaker.These two mods are essential to use Ref (in fact, you can not install Resource Loader, but how to customize the appearance of the machine is not within the scope of this tutorial)

2. Register a single block machine

After downloading the mod and running, the REF will generate configuration files.

Open the ASSEMBLY file in the replacement file (.minecraft/Config/Requious/Assembly.json)

You can see that the file contains a single list of a JSON object, and some of which have been filled in the default value in advance.

The following parameters are very important. Other filling silent value can be used (in fact, I don’t know what is useful. At present, there is no documentation to refer to it)

PlaceType: determine the direction of players placed the machine (should be).

Hasgui: determine whether the machine has a GUI optional True False

ResourceName: The registered name of the machine (below is registerName), it must not be repeated, otherwise you will not enter the game.(Not recommended non -English)

Model: The model of the machine, but it actually points to the BlockState file, (the same is the same as the ResourceName)

Hardness: The hardness of the machine, refer to Minecraft wiki to fill in

3. Set the appearance of the machine

If you downloaded Resource Loder, then create related file folders in the following format in the resource folder in the root directory

.mineCraft/Resources/Requiousfrakto/Blockstates

.mineCraft/Resources/Requiousfrakto/Models/Block

.mineCraft/Resources/Requiousfrakto/Textures/BLOCKS

.minecraft/Resources/Requiousfrakto/LANG

First of all, it is recommended to use blockbench to create the model of your machine (only the original Java original mode can be used, and it is recommended to put the material on the model here), and then the .json file is put in the Models/BLOCK folder in the .json file

Create a file in the Blockstates folder. The file name is the same as the name filled in after the "Model" in the Assembly file.

Then copy the following code and put it in it

 {
 Forge_marker ": 1, 
" defaults": {
" Model ":" Requiousfrakto: RegisterName ", 
" transform ":" Forge: Forge: Forge: FORGE: FORGE: FORGE: FORGE: FORGE: FORGE: Forge: "default-black "
}, 
" variants ": {
" NORMAL ": [{}], 
" inventory ": [{}], 
" Facing ": {
" down ": {" x ": 180}, 
 "up": {}, 
 "": {"x": 90}, 
"SOUTH": {"x": 90, "y": 180}, 
 west ": {" x ": 90," y ": 270}, 
 East ": {" x ": 90," y ": 90} 
},
 "active": {
 true ": {}, 
 False ": {} 
} 
} 
} 
registerName Fill in the file name of the model in your model in the Models/Block file

Finally, create language files (en_us, zh_cn of en_us, zh_cn) in the LANG folder

One machine corresponds to two key, which are machine names and formula names (that is, the purpose of this machine, use Jei to press the U key to view the one displayed above)

Tile.registerName.name = xx

Requious.jei.Recipe.registerName = xx

In this way, the resources of a machine are set up here.

4. Set the slot position

1. Introduction to the class

Ref adds the following types, mainly 1.Assembly: refers to a machine

2. MachineContainer: For some advanced operations, it provides examples in certain functions.

3.AssemblyRecipe: For the formula

The Assembly class can be called through sprint brackets, the method is (xxx is the registered name of the machine)

2. Precautions

You can think of the entire GUI as a plane rectangular coordinate system full of 45 slots. The origin is the slot position in the upper left corner (that is, this point coordinates (0,0)). Do not forget "0" when usingExistence.

When setting a slot, try not to be the same as possible, otherwise the bug may appear

3. Start operation

Look at Wiki for the specific method. This part is relatively easy to understand.

5. Add formula

See the following code

var recipe = AssemblyRecipe.create (function (container) {

container.addItemoutput ("Output", Output);})

.requireitem ("input", input);

A variable is set here for the convenience and recommendation of adding formulas.

The relationship between the class and the method here is more complicated, as follows:

First call the function of AssemblyRecipe.create (Function (Container)) {}. The function provides an instance of a MachineContainer.

After that, the adDItemoutPut method of the MachineCotainer class was called to add an output item to the "Output" slot to this formula.

After that, the RequireItem method also adds a request to this formula under the AssemblyRecipe class, requiring to enter an item from the "Input" slot.

If you feel complicated, change the output to the items you want to output, and change it to the item you want to enter (you can view it by/mt hand), and then match it with the previous slot.

At this point, the creation of a machine is over.You can try this tutorial.If you have any questions, please give feedback under the post.