your current location:首页 > news>1.18+CRT entry tutorial -starting from 0 [CRT] Crafttweaker Minecraft Game

1.18+CRT entry tutorial -starting from 0 [CRT] Crafttweaker Minecraft Game

2024-12-10 17:56:14|Myriagame |source:minecraft skins

Foreword

This tutorial is applicable to CRT with versions of 1.18.2 and 1.19.2, and the 1.16.5 version has not been tested (testing with PCL2).

Because I have limited technology, there must be some shortcomings in this tutorial, so please forgive me.If you have better suggestions, please point out in the comment area or private message, and be grateful!

The tutorial is for the unsecured high version (1.18+) CRT players, so there will be an explanation of terms and nouns in the tutorial, so that players can better understand.

The reason for writing this tutorial is to see that some players in the comment area say that the 1.19.2 CRT does not understand, and the encyclopedia has no 1.18+ CRT entry tutorial, so I wrote a handwritten article.

Create .zs file

This is the most basic part of CRT.

After installing the module, turn on the game and create a new world (note that you need to open the allowable cheating, otherwise the instruction cannot be used), and then enter in the instruction box:

/CT scripts

You can get the following results:

If you click on that yellow word, you can open the Scripts folder.

Then create a new text document in it, as shown in the figure:

The rename of it renamed its suffix to .zs, as shown in the figure:

(The name can be taken casually, and it must be the same as the "test" in this tutorial.)

By the way, talk about how to modify the suffix name:

The computer defaults to not display the gold. If it is not changed, there is no way to turn it into a .zs file

First of all, when we turn on this computer, we can see the blue button "file" in the upper left corner. Click in, you can see "Change the folder and search options":

After clicking, there is a row of options on it. Click "View". There is a column of "Advanced Settings" below. Sloping down, you can see "Hide the expansion of the known file":

The default is a √, we just need to point √ 没, then click "Apply", just click "OK", and then we can see and modify the expansion of the file.

Well, the words are returned, and the .zs file (notepad can be opened), you can write code in it.

Preparation

Preparation Knowledge 1: Benefit bracket reference

CRT uses brackets to reference items in the game.The format is as follows:

It's not easy to understand, then let's look at two examples, quoting diamonds in Minecraft:

Quote the waterwheel in mechanical power:

Note: "<" and ">" must be entered in English, and the colon must be the colon in English instead of the Chinese colon that is not Chinese ":".

There are also many things that can also be quoted.For example, all formulas treated by a block:

Format:

For example, quote all furnace formula:

Quote the magic synthetic formula of all Plant Rubik's Cube:

The following table lists some of the common formulas that can be processed to handle formulas to the corresponding formula names:

The formula name of CraftingsMithpfire_CookingBlasting corresponding

Preparatory knowledge 2: global variables

This term is more troublesome to explain, so just remember that this is a string of English arranged by CRT for the square of each processing formula (in fact, the English name of the block is not much different)

Block famous workbench furnace forging Taiwan camp fire blast furnace gliftingtable

furnace

Smithingcampfire

blastfurnace

Delete formula

All the following code is written into the .zs file.

CRT provides a lot of ways to delete formulas. Here

Remove

Remove () can remove all the formulas of the specified item. The format is:

Global variable.remove (cited item);

For example, the formula of the diamond sword in the workbench:

craftingtable.remove ();

For another example, remove the formula of iron ingots in the furnace:

furnace.remove ();

Note: Keep in mind that you need to add a section after the code is written!Must be added to the score of English instead of Chinese!Otherwise you will report an error!

Removebymodid ()

This method allows you to delete the formula according to the Modid of the formula name.The format is as follows:

Global variable.removebymodid ("Modid"); for example, all workbench formulas in the mechanical power module: craftingtable.removebymodid ("create");

Remove all furnace formulas in the original version of Minecraft: furnace.removebymodid ("Minecraft");

Note: All quotes need to be used in English!

Removeal ()

This method is the most violent method because it can remove all the formula of a work block.The format is as follows:

Global variables .removeal ();

For example, remove all the recipes in the blast furnace: So it can only be fired with a furnace (and smoke furnace)!

blastfurnace.removeal ();

Add formula

Only deleting the formula will only make the game's playability worse and worse, so we need to add a formula.

In the entry stage, we mainly learn how to add the workbench formula.

Add disorderly formula

Using CraftingTable.addshapeless can add disorderly formula to the workbench.The format is as follows:

Craftingtable.addshapeless ("Name of the New Formula", quoted output item*number*, [referenced input item]);

The name of the new formula can be taken freely according to personal preference, but it cannot be replaced.

For example, add a disorderly synthetic table and use two soil to synthesize two diamonds:

Craftingtable.addshapeless ("Eg1", *2, [, ]);

Some careful players should have noticed that if there are more than one input item, you need to separate English comma.

The following is the effect after completion:

Add an orderly formula

Use CraftingTable.addshapet to add an orderly synthetic formula to the workbench.The format is as follows: (Actually similar to disorder)

Craftingtable.addshaped ("Name of the New Form", quoted output items*number*number, [referenced input item]);

For example, add a diamond ax formula that can be synthesized by 2*2 workbench:

Craftingtable.addshaped ("Eg2", , [

[, ],,

[, ]

]);

The following is the effect after completion:

It should be noted that in an orderly formula, there are a few more brackets, indicating that the items in it are in the same row of the workbench.Therefore, the specific format (3*3 synthesis table) should be:

Craftingtable.addshapet ("Name of the New Form", quoted output item*quantity, [

[Item 1, Item 2, Item 3],

[Item 4, Item 5, Item 6],

[Item 7, Item 8, Item 9]

]);

If it is 2*2 synthetic table, it is:

Craftingtable.addshaped ("Name of the New Formula", quoted output item*quantity, [

[Item 1, Item 2],

[Item 3, Item 4]

]);

If there are no items in a certain location, use instead.

Complete code

After the code is completed, save it in the .zs file, and then return to the game, enter in the instruction box:

/regoad

You can refresh the game.If your CRT has no error, then congratulations, you succeed!Hurry up and try if your changes have been effective!

At this point, your Jei should have shown that you change the formula.If you find that you do not show (most of this happens in version 1.19.2), do not panic, you will display it after exiting the world and re -entering.

The following is a complete CRT magic reform program I made as an example: (some code has been displayed as an example when it was introduced.) This code is written at hand, there is a mistake, see if everyone finds it?If you understand this code, then congratulations, you have mastered the most basic usage of CRT.

postscript

CRT is a very powerful module that can perform many magic reform operations. What this tutorial shows only the tip of the iceberg.If you want to continue to understand the advanced usage of CRT, you can learn from other tutorials of CRT's official Wiki and MC Encyclopedia.

I hope that this tutorial can bring more players into CRT, instead of being dismissed because it feels too troublesome and complicated.

If there are errors or deficiencies in the tutorial, please point out!

Since the official wiki really helped me, I would like to thank you here and give it the portal.