your current location:首页 > news>May be the most complete!1.12.2 CRT Basic Collection [CRT] CRAFTTWEAKER MINECRAFT Game

May be the most complete!1.12.2 CRT Basic Collection [CRT] CRAFTTWEAKER MINECRAFT Game

2024-12-06 22:10:07|Myriagame |source:minecraft skins

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

Foreword

The information of this tutorial comes from the official documentation of Crafttweaker and the tutorials made by Youyihj.

I am a tutorial porter ~

The purpose is to clarify the basic knowledge of CRT at one time.

If you eat this tutorial, I believe you can write a script by yourself, and it is not a simple formula, it is more advanced.

Zenscript basics

Zenscript is a script language that can be seen as similar to programming languages ​​such as C ++ and Java.

";" Means the completion of a code statement.

Write the first script

Find the Scripts folder in the root directory of the corresponding version of the folder, create a new TXT file, and then change the suffix to .zs

Use VSCode or other text editors to open the file and enter the following sentences:

 Print ("Hello World!"); 

Now loading MINECRAFT, you can see the execution effect of the statement in the Crafttweaker. Log file (that is, output Hello World in the log!)

Log file format

The log file uses a specific format in its output. The format is:

[LoadersStage (loading stage)] [SIDE (load end)] [Type (Severe)]

The loading end is divided into: client (client) and server

Severe degree from light to heavy order: general information (info), warning (warn), error, and fatal

Use the example above, the output will be:

 [prebinitialization] [client] [info] Hello world! 

This means that in the pre -initialization stage, the client outputs a general information, the content is Hello World!

The purpose of the log format is to make it easy to debug. The only when the format is not used to command the storage. In this case, it is just printing messages. This is easier to copy and paste the storage.

Annotation

Note can make script files more readable and easier to understand!

Zenscript supports three types of comments, namely:

Single comment:

 // I am a single notes 

Another one -line annotation:

#I am also a single comment 

Multi -line comments (there is no space between slashes and star numbers):

/*I am

Multi -line comments*/

The comment statement is read for people, and the comment statement will not be read when the program is loaded!

Some code will report an error, but it may be the results of your struggle for a long time. If you want to continue and do not want to delete it directly, you can annotate the code first.

Special term

Zengetter

A way of obtaining information from an object.

For example, to obtain the name of the iron ingot, you must use Zengetter:

  .displayName 

Zensetter

Zensetter's working method is almost the same as Zengetter. The only difference is that Zensetter is setting attributes, and Zengetter is to obtain information.

For example, set the display name of the iron ingot to "Silver", and use ZenseTter:

  .displayName = "Silver"; 

Zenmethod

ZenMethod is a real method, requires parameters, and will execute some special things.It may not return the value or return.Look at the descriptions of each ZenMethod.

Information technology

Local variable

In the program, many data will appear in the form of "variables".

If the data is a car, the variable is a parking space.Variables are used to store data.

In Zenscript, we can use the following code to declare the local variable:

 var a as int = 0; 

Among them, VAR is the keyword that declares the local variable, telling the program that we are going to declare local variables.

A is the name of the variable, and each variable needs to be named.The names of the variables have a certain norm. You can use the "Little Hall" named, or you can use the next line to separate the words.

Name of Little Camel: MyFirsname

Named on the bottom line: My_FIRST_NAME

The standardization of the variable naming can check the relevant information by itself.

Do not appear any character in China, Japan, and South Korea in China, Japan and South Korea!

0 is a data, where the initial value of variable A is here.The initial value can be assigned arbitrarily as needed, but the declaration variable must have an initial value!

AS Int is a method for the data type of the Zenscript transformation, which can convert the type of data to int type.

Local variables can only be used in the current script, and local variables cannot be called in other script files.

Basic data type

When we just declare the local variables, we came into contact with the concept of data type. Here we briefly introduce the basic data type.

The basic data type is the most basic and directly stores a value.They do not have any ways, Zengetter, Zensetter available.

Each data has its own types. In Zenscript, there are eight basic data types below:

Integral

Express the integer, there are four types: Byte, SHORT, INT, Long, and the integral is default

byte: Use 1 byte, 8-bit, 256 forms, the value domain is [-128, 127] ∈z

Short: Use 2 bytes, 16-bit, 65536 forms, the value domain is [-32768, 32767] ∈z

INT: Use 4 bytes, 32-bit, 4294967296 forms, the value domain is [-2147483648, 2147483647] ∈z

Long: Use 8 bytes, 64-bit, 18446744073709551616, with a value domain of [-9223372036854775808, 9223372036854775807]

Floating -point type

Represents decimal, there are two types: Float, Double, decimal default is Double

Float: Use 4 bytes, 32-bit, single precision, can be accurate to 6-7 digits, the value domain is {-∞} ∪ [-2^128, -2^-149] ∪ {0} ∪ [2 2^-149, 2^128] ∪ {+∞}

Double: Use 8 bytes, 64-bit, dual accuracy, can be accurate to 15-16 digits, the value domain is {-∞} ∪ [-2^1024, -2^-1074] {0} ∪ [2 2 [2^-1074, 2^1024] ∪ {+∞}

Note: In addition to 0.0, 0.0 will cause calculation errors and return NAN non -value

Boolean

Indicates that true and false, there are only two values: True and FALSE, there is a type of BOOL

Non -type

Indicates null, used to function or method to indicate that the function or method has no return value, and there is a type of VOID

Remaining matters

When defining variables, use sentences such as "AS data type" to avoid unnecessary errors.

You can add a field to some data to indicate the data type of the data, such as:

0.0F means 0.0 of the Float type. Similarly: D represents Double type, L represents the LONG type.

Basic operation

Assignment

In Zenscript, use "=" for assignment.

The assignment is the operation of setting the value of the variable to the specified value. It is a "set" action, which is different from the "equal" in mathematics.

Mathematical operation

In Zenscript, use "+", "-", "*", "/", "%", "~" to complete the calculation operation of the plus, subtraction, multiplication, division, balance, and connecting string.

Behind the operation of the computing character, "=", it becomes a symbol similar to "+=", "-=", which is called the assignment operator for self-operation.

A + = 1 equivalent in A = A + 1

Using self -transportation can simplify some scripts.

Logical operation

In Zenscript, use "&&", "||", "^", "!", "==", "! =", "<=", "> =", "> ="

To complete the logical operations that are compatible with, or, different or, non -, equal, unkind, less than, less than equal, greater than equal.

Calculation error

When the mathematical operation results occur, it is likely that you use different types of numbers.For example, 13 % 6.5 results are 1, but the correct result should be 0. What happened?Zenscript always processes the two data types of the operation to make it the same type.In the above example, it will convey the second data to match the first data.

In the above examples, the calculation will be processed into 13 % 6. The second number (dual -precision floating -point) will be forcibly converted into the type (integer) of the first number.

You can convert 13 to Double types to avoid calculating errors.

Crafttweaker foundation

Pointed bracket call

Zenscript uses <> to represent an object of the game.Such as items and minerals.

By the string in the sprite, you can get specific items and minerals in the game.

example:

  //

// Get the iron ingot ore

// Get the original calculation and fear of physical definition (IEntityDefinition)

//

// Get the original speed effect (ipotion)

You can add the META value after the ID, and the META value is the special value required to use the /give instruction.

For example, means red wool instead of white wool.

The durability of the tool also belongs to the META value.

The Meta value allows the use of * pass to indicate all meta values.

Add. Withtag () after the sprite brackets, you can write the NBT data of the item in the small bracket.

Ordinary data type

Similar to basic data types, but ordinary data types can generally use Zengetter, Zensetter and ZenMethod.

For all ordinary data types of the original Minecraft, you can find it in the Vanlia subdirectory of the Crafttweaker's official document: https://docs.blamejared.com/1.12/index

Common ordinary types are:

String (String): Text, you can use logical operators such as "=="

IITEMSTACK: an item, such as

Ingredient: one or more items, such as , >

IOREDICENTRY: multiple items represented by a mineral, such as

Iliquidstack: A fluid, such as

Import module

Generally, the use of other ordinary types, non -overall functions, and event functions, etc., need to be introduced.

The import module uses Import keywords and must be at the beginning of the script file.

For example:

 Import Mods.jei.jei; 

This will be introduced from the module Just EnoGH items.

After importing the entire module of Jei, we can use all the functions (methods) in this module. Of course, the function of using the JEI module is to specify the module.

For example:

 jei.hide (); 

This will hide diamonds from the Jei display page.

We can also import the Hide function directly when importing modules, so that the module is specified when used

For example:

 Import Mods.jei.jei.hide; 
, the above script can be written directly:

 Hide (); 

Use AS keywords when importing modules, you can customize the name of the module.

 Import Mod.jei.jei.hide as h; 

In this way, the HIDE function is renamed the H function, and the above script can be written directly:

 h (); 

Array

In high school mathematics compulsory middle school, we come into contact with the concept of collection. In fact, in information technology, the collection is an array.

The array is a container, and the types of elements stored in an array are the same.

You can access the data from the array, or you can modify the data in the array.

You can specify the initial element for the array, or you can not specify.

Unlike the collection, the elements in the array have a order and can be repeated.

Example:

 var array1 as int [] = []; // Define an array of an int type, without the initial element

var array2 as int [] = [10,20,30]; // Define a array of an int type, there are three initial elements

Var Strings as String [] = ["Apple", "Carrot"]; // Define a string type array, there are two initial elements

VAR ITEMS As IITEMSTACK [] = [, ]; // Define a array of an IItemstack type, there are two initial elements

The elements in the array are bidding. You can add elements or modify data to the array in the following way.

 var numbers as int [] = [10,20,20]; // Define a array of an INT type, there are three initial elements

numbers [2] = 30; // Modify the element with a bid to 2 to 30

Numbers+= 40; // Add an element to the end of the array

The array after the modification becomes: [10,20,30,40]

Note: The first element of the array is 0, and it is 1, 2, 3 ... and so on.

The array has a length attribute, returning the number of elements of the array.

 var array as int [] = [2,4,6,8];

Print (Array.Length); // The number of elements of array is 4, output 4

Multi -dimensional array

In the collection, we have seen this kind of thing: {{1,2,3}, {0, -1, -2}}

It can be seen that there are two small sets in a large collection.

This concept -like to the array is a multi -dimensional array. In short, the array array.

Example:

 var array as int [] [] = [1, 2, 3],

[4, 5, 6],

[7, 8, 9]

];

Associated array

The associated array is a special array that stores the "key value pair" inside, the purpose is to correspond to the key (key) and value.

The associated array did not bid, and the key was replaced by the key.

You can use any data type of Zenscript as key (except for arrays).

The form of the key pair is key: value, the key is in front, and the values ​​are behind.

Can use variables as key, variable names will be parsed as string.

The array can be used as a value, but it cannot be used as a key.

Example:

 VAR MAP As Iitemstack [String] = {

GOLD: ,

Iron: ,

Diamond:

};

// Define a associated array named MAP, key is String, and Value is IItemstack type

In this way, each string corresponds to the items stacked one by one, and we can use Map [Iron] to get .

Using Zensetter, you can change the corresponding value of the keys in the associated array.

Some people say that when I define the associated array, I wrote the data type of the key and values ​​when I define the associated array. How can I remember it?

It's very simple. Contact the bidding that we have previously. Since the so -called "key" replaces the original bidding, the natural key in the square bracket is the data type of the key, not the value type of the value in the square bracket.

Cycle and traversal

for loop

The FOR loop is also called "counting cycle", which allows a piece of code to perform multiple times, and at the same time enhances the readability of the script.

Let's see how an ordinary for loop is used:

 for I in 0 .. 10 {

Print (i);

}

for I in 0 to 10 {

Print (i);

}

// Print () functions will be executed 10 times, and output: 0, 1, 2, 3, 4, 5, 5, 7, 7, 8, 9.

// There is no difference between the first writing and the second writing. You can choose arbitrarily. I personally like to use to.

The execution results of the above two examples are the same, of which:

i is a variable. Each cycle is over, and its value will be +1.Starting from 0, until 10, but not including 10, in a range of left and right open.

Each cycle will execute the statements in the brackets, and you can also write multiple sentences.

Through the FOR loop, we can perform the operation of the array:

var numbers as int [] = [2, 4, 8, 16, 32, 64];

Print (numbers [i]);

}

// Output 2, 4, 8, 16, 32, 64

While loop

WHILE cycle is also called "condition cycle" and can also execute code multiple times.

When the judgment expression in the small bracket is True, the statements in the large bracket will be executed, and then the expression is judged again. TRUE continues the loop, and False does not perform the cycle.

Let's see how an ordinary While loop is used:

 var I as int = 0;

While (i <= 10) {

Print (i);

I+= 1;

}

// Print () function will execute 11 times, and output i in order: 0, 1, 2, 3, 4, 5, 7, 7, 9, 10

foreach cycle

Foreach loop is also called "enhanced for loop", which is used to traverse the array, which is readable, does not require a bid, and traverses every element in the array.

Define a array and traverse:

 var numbers as int [] = [2, 4, 8];

for number in numbers {

Print (number); // Output 2, 4, 8

}

Define a associated array and traverse:

 Var Map as String [int] = {

1: "One",

2: "Two",

3: "Three",

4: "Four"

};

// Key traversal method

for key in map {

Print (key); // Output 1, 2, 3, 4

}

// Key-Value traversing method

for key, value in map {

Print (key ~ "->" ~ value); // Output 1-> one, 2-> two, 3-> 3, 4-> 4}

// Entry traversal method

for entry in map.entryset {

Print (entry.key ~ "->" ~ Entry.value); // Output 1-> one, 2-> two, 3-> 3, 4-> 4

}

break and continue

Break and Continue can be used in the for loop and the While loop.

After executing to the BREAK statement, the current cycle will be over.

 for I in 0 to 5 {

If (i == 3) {

Break;

}

Print (i);

}

// I equal to 3, execute Break, and end the loop

// Output 0, 1, 2

After executing to the Continue statement, jump out of this cycle and enter the next cycle.

 for I in 0 to 5 {

If (i == 3) {

Continue;

}

Print (i);

}

// I equal to 3, execute the continue, jump out of the current loop, and enter the next loop

// Output 0, 1, 2, 4, 5

IN/HAS operator

You can use the IN/HAS operator to determine whether A contains B.In the following examples, IN can be replaced with HAS.

 // Detect the loading module

ifadedmods in "thermalfoundation") {

Print ("Thermal Basic MOD has been loaded");

}

// Test the material object

if ( in ) {{) {{) {

Print ("The mineral dictionary of iron ingots is correct!"););

}

Please pay attention to distinguish between the left and right parameters: only when all the objects after IN can be found before IN, the result is true.Has may be more in line with English grammar and easier to understand.

Conditional function

If the keyword is a part of the conditional statement of the writing conditions. When the expression in the small bracket is true, the code block in the IF large bracket will be executed.Note that the two equal numbers are the comparison operator, and the one is the assignment operator!

Single IF structure

The expression in the IF small bracket is also called judgment expression.

Code block consists of statements.Code blocks can have multiple statements, only one statement, or no statement.

 // The first example

if (1> = 0) {// Judgment expression is true

Print ("1 greater than or equal to 0!"); // Execute the statement in the IF large bracket

}

// The second example

if (1 == 1) {// Judgment expression is true

Print ("1 equal to 1!"); // Execute the statement in the IF bracket

}

// The third example

if (1 <0) {// Judging the expression is false

Print ("1 less than 0!"); // Statement not executed in IF brackets

}

if -else structure

ELSE keywords can be used as the second half of the conditional statement. When the IF judgment expression is false, the code block in the ELSE large bracket will be executed.

 // The first example

if (1> = 0) {// Judgment expression is true

Print ("1 greater than or equal to 0!"); // Execute the statement in the IF large bracket

} Else {

Print ("1 less than 0!"); // Not executing statements in ELSE large brackets

}

// The second example

if (1 <0) {// Judging the expression is false

Print ("1 less than 0!"); // Statement not executed in IF brackets

} Else {

Print ("1 is not less than 0!"); // Execute the statement in the ELSE large bracket

}

if -else -if structure

What if the conditions are then judged after Else?You can use iF-Else-IF.

 Var Mark as int = 90; // Define a score, the score is 90

if (mark <60) {// The first judgment, whether the score is below 60

Print ("" Fortunately, "); // 90 is not less than 60, and does not execute the statement here}

Else if (Mark <90) {// The first judgment as false, the second judgment, whether the score is below 90

Print ("grade pass"); // 90 is not less than 90, not executing the statement here

} Else {

Print ("excellent performance"); // execute the statement here, output "excellent performance"

}

All conditional control statements can be nested and used, you can write conditional control in the code block of a conditional control statement.

The IF readability of more than three layers of nested will become worse and worse, and it is not recommended to use too many nests.

Triple operating symbol

For some simple judgments, do you need to write several lines with if else, isn't it troublesome?You can use the three -way operator to simplify the operation.

Example:

 c = flag? a: b;

// If FLAG is True, the C assignment C is A, otherwise it is B

Global function

The global function is a function that can be called without importing.

Here are all global functions:

print

Print the string information into the log of Crafttweaker.

Format: Print (String Message);

Example: Print ("Hello World!");

No return value

TOTALACTIONS

Return to an int to show how many global functions are registered.

Format: TOTALACTIONS ();

Example: TotALACTIONS ();

enabledebug

Enable debugging mode.

However, it is best to use debugging processors.

Format: enabledebug ();

Example: enabledebug ();

No return value

isnull

The detection object is NULL, and often use this to avoid air pointer abnormalities.

It is invalid for basic data type objects (INT, FLOAT, etc.).

Format: Isnull (Object);

Example: Isnull ();

Return a book

Instanceof

The detection object is a data type

Format: Variable Instanceof Type;

Example: Entity Instanceof Ientity;

Return a book

max

Return a larger number

Format: MAX (int Number1, int Number2);

Example: max (10, 11); // get 11

min

Back a smaller number

Format: Min (int Number1, int Number2);

Example: min (10, 11); // get 10

POW

Returns a Double, value of Number2 with Number1

Format: POW (Double Number1, Double Number2);

For example: POW (2.0, 4.0); // get 16

Global and static variables

Disclaimer global and static variables

The statement is very simple.Note that the "AS data type" cannot be omitted, and the defined global and static variables cannot be defined again, and the type or value of its type or value is modified.

Global variables can be used directly in other scripts, and static variables also need to call span.

 // Define a global variable

Global Stone as Iitemstack = ;

// Define a static variable

Static Dirt As IItemstack = ;

Scripts containing global variables need to be prioritized with priority pre -loaders to ensure that they are prioritized.

Local variables can cover global variables.

Global variables can be directly called anywhere, but the disadvantage is that you may not remember where the definition of the variable is.

The use of static variables is required by script reference, but the advantage is that it is easy to know which script the variable is defined and easy to maintain.

The global and static variables that can be modified

There is a way that can bypass the dilemma that cannot be modified again after the definition of the global and static variables.

 // Define a static array in the script

static array as int [] = [1];

// Modify the value of the first element in the array

array [0] = 10;

// Output the value of the first element of the array

Print (array [0]);

Although the array array as int can not define and modify its type again, the elements inside the array can still be modified.

Not only a array, you can also define a static associated array. Although the associated array cannot define and modify the type again, it can also modify the internal data many times.

Pre -processor

Pre -processor will be executed before the script execution.

They can perform various actions: for example, enable the debugging mode or not display the sprite line call error.

The pre -processor needs to be called with the # comment function.

Therefore, you must pay attention to writing annotations, because a comment that contains keywords containing the pre -processor may be written.

Note: The global use indicates that there is only one script with the pre -processor, and all scripts will be affected by the processor.

#Debug

The class file compiled by all scripts in the Generated folder will be output

Can be used globally

#ignoreBracketerrs

Ignore the error of the sprite (when the item ID is wrong, it will not report an error, but it will be changed to NULL)

Can not use global

#Loader loaderName

Set the script loader, the default script comes with #Loader crafttweaker

Can not use global

#Modloaded modid

This script will be loaded only when the specified MOD is loaded. You can set multiple modids, or you can take the non -value (add an exclamation mark before the modid)

Can not use global

#norun

The script will not be loaded, although the/ct syntax command will still detect its syntax error

Can not use global

#priority number

Set the script load priority, the larger the number, the more loaded first.The script with the same priority will be loaded in order in order

Can not use global

#ikwid

The warnings and errors generated by the script will be printed in the log, and will not be displayed in the game

Can be used globally

#Sideonly sidename

SIDENAME can use client or server, specify that the script runs only on the client or server

Can not use global

#profile

Will printed the cost of each modified formula on the log

Can be used globally

#disable_search_tree

The reconstruction of the formula before the loading script may be re -calculated, which may be able to speed up the script loading speed

Can be used globally

Custom function

Sometimes the Crafttweaker itself and its affiliated functions are not enough.Next we will explain how to build a custom function!You can even nose in a function.

Basic format:

<<> function function name

[Code]

Return function return value;

}

However, in fact, it is necessary to have only functions and function names. If a function that does not require parameters, there is no parameter table, only a pair of small brackets.

If you do not need to return the value, you do not need "AS Return Type Name" and "Return".

If the code required for this function is only a line, you can write directly to the row of Return, without other code.

Return keywords will return the specified value to the calling point of the function to perform follow -up operations.If the function is processed, when you touch the Return, the program will jump out of the function and no longer perform the operation in the function.So the general RETURN is at the bottom of the function code.

Example:

 // Customly define a function that integrates the delete formula and the addition formula

function recipeTweak(isShaped as bool, out as IItemStack, input as IIngredient[][]) {

Val recipename as string = getItemName (out);

Recipes.remove (out, true);

If (iSShaped) {

Recipes.addshaped (recipename, out, input);

} Else {

Recipes.addshapeless (recipename, out, input [0]);

}

}

Expansion method

The extension method can add more methods to the existing class.

The extension method is similar to the custom function. There are many different discussions about functions and methods, and the provisions of each language are not the same.

In Crafttweaker, their differences may be that the extension method is in the class, and the custom function is outside the class.

Since the extension method is in the existing class, after the expansion method is declared, it is only necessary to import the class to which it belongs to directly call it without using a cross -script call like a custom function.

Note that the expansion method is static.Declars the expansion method in the following format:

$ Expand class name $ method name (parameter AS parameter data type) AS return value data type {

[Code]

Return return value;

}

When the expansion method is declared, the module must be introduced first, that is, the class it belongs.

Note: Class is an information technology concept. In Crfttweaker, ordinary data types except String are class categories.

Example:

 Import Crafttweaker.Item.iitemstack;

// Expand a method for the IITEMSTACK class, which is named Show

// No return value, and the command string of an item will be output in the log after use.

$ Expand IItemstack $ Show () as void {

Print (this.comMandstring);

// This keyword points to the reference of the current object

// Commandstring is the way you call this item in Zenscript.This can be a pointed bracket call or something similar to it.

}

// Use the show method

.show (); // Eventually output ""

in the log

Cross script call

Cross -step calling is mainly for static variables, but custom functions and classes also need it!

Cross -step calls need to start with scripts. Match the relative path.First match the directory, then match the script and value.

Example:

A static variable was declared in the A.ZS script, and a function was customized

 Static myval as string = "MyVal";

Function Makeline () {

Print ("--------------------");

}

Draw the static variables and functions of A.ZS in B.ZS

 Print (scripts.a.myval);

scripts.a.makeline ();

We also use Import to import it as a module, such as calling the content in A.ZS in C.ZS

 Import scripts.a;

Print (a.myval);

a.makeline ();

Formula modification

Workbench

Add an orderly synthetic formula

Basic format:

 recipes.addshaped (recipename, output, inputbox); 

1.12 Mojang modified the synthetic registration system. Each formula was stored in a JSON file, and each formula had an ID.

When you open the advanced prompt box (F3+H), you can see the ID of each formula in Jei.

But in fact, you can also omit the formula ID, just like the old version, so that the CRT will automatically specify the formula ID using the hash value.The formula name cannot be repeated.

Output is the formula output.InputBox is the required item.For example, let's take an example of iron -legged.

It is expressed so in CRT:

 // Formula

recipes.addshapet (, [

[, , ],,

[, NULL, ],,

[, NULL, ]]

]);

It can be seen that Output must be an IItemstack, and INPUT is a two -dimensional array, and there are three one -dimensional array inside, indicating that each layer of the workpiece is placed in the items in the workpiece.

Each one -dimensional array is three EINGREDIENT, which is represented by NULL where there is no items.

What?I still don't know what IITEMSTACK and INGREDIENT are?Chapter 4 Chapter 2 Welcome

In this way, you can add the formula of the work station.

Add disorderly synthetic formula

Basic format:

 recipes.addshapeless (recipename, output, inputbox); 

Taking the eye of the last shadow as an example, it is expressed in CRT:

 // Formula

Recipes.addshapeteless (, [,

]);

Here an INPUTBOX is just a simple one -dimensional array, because it is an disorderly formula, and it does not need to be a two -dimensional array to determine which line in the workpiece.

Available:

 recipes.addhidedenshapeless (recipename, output, inputbox); 

Add hidden disorderly synthesis.

Remove the workbench

 recipes.remove (item, nbtmatch); 

Delete all the formulas of the item, NBTMATCH (omitted) is True/False.

If it is True, the items that delete the formula will match NBT.The default (that is, omitted) is false, not matched NBT.

 recipes.removeshaped (item, inputbox); 

Delete a specific orderly formula for items, and inputBox can omit, so as to refer to all orderly formulas of delete items.

 recipes.removeshapeless (item, inputbox); 

A specific disorderly formula for deleting items, inputbox can omit, so that all the disorderly formulas of deleting the items are referred to.

 recipes.removebyRecipename (recipename); 

Delete the formula based on the formula ID.You can use regular expressions.

 recipes.removebymod (modid); 

Delete all the formula of a mod.

 recipes.removeal (); 

Delete all the formulas in the game.

Furnace formula

Add furnace formula

Basic format:

 furnace.addrecipe (output, input, xp); 

Among them, output output, input input, XP is to give experience (using dual -accuracy floating points, you can use decimal, you can omit).

Remove the furnace formula

Basic format:

 furnace.remove (output, input); 

Remove the melting furnace formula that burn Input into OUTPUT, and input can omit it, so that it refers to deleting all the formulas that burned into Output.

Furnace fuel

Basic format:

 Furnace.setFuel (input, Burntime); 

Set a item to fuel, and set the time, and the time unit adopts the game carving.Coal is 1600, and it takes 200 items to burn an item.Set the burntime to 0 to delete the fuel.

Mineral dictionary

Ore

Forge Ore Dictionary (OD) is a post from the author Eloraam of RedPower2,

At that time, some people were controversially caused by the chaos caused by RP (redstone power) and IC (industrial). The FORGE mineral dictionary was born.

The FORGE mineral dictionary is a system that allows minerals with different modules. For example, different copper mines are collected in the world, which can be used to synthesize the same items, and even mix and match!

Mining

Miner Name .add (Item Name);

Add a certain item to a certain OD

  .add (); // Add the stone into the sand of the sand

// If the mine's mines do not exist, then create a new mineral resignation

The name of the mine .remove (item name);

Delete a certain item from a certain OD

  .remove ();

// Delete the sand from the mineral dictionary of the sand

Mining name .addall (mineral name);

Include all items in a mineral dictionary in another mineral dictionary

Mining name A.mirror (Mining Name B);

Perform all A's items to B, which means that B contains the original B and A, but A does not contain B in A

Event introduction

Event concept

Incidents, as the name suggests, each action in each time in the game is an event.

For example: players log in to the world, the entity is harmed, players synthetic items, etc.

They are all events.

We can monitor the incident through the event manager, that is, to detect "when ... occur",

Later, you can write statements through the objects of the incident to achieve changes in the content of the game!

Event manager

Through the event manager, we can add a function of the event, and we can decide from the operation that the CRT will perform after a certain event.

The most important thing to remember is that the corresponding class is required to specify the event!Otherwise, the information included in the event will not be accessible.

If you just want to print some things where you don't need to access the event, you don't need a type.

The event function format is as follows:

 Events.on event (Function (Event AS event) {

[Code]

});

Among them, the event is an event that can be called in the game, you can on https://docs.blamejared.com/1.12/zh/vanilla/events/IEVENTMANAGER page

Find all the events that can be called and use the relevant modules they need to be imported!

Example:

 Import Crafttweaker.events.ieventmanager; // Import event manager

Import Crafttweaker.event.playerCraFTEVENT; // Import the class of players' synthetic events

// OnPlayerCraft When the player is synthesized

Events.onPlayerCraFted

// Which player is the item that is obtained

Var Player = Event.player;

// Let the player suffer 1 magic damage

Player.attackedityFrom (, 1.0F);

});

Some events can be eliminated through event.cancel (); the incident is eliminated, which is equivalent to the incident that did not happen.

How to check the official documentation

When writing an event function, it is essential to consult the official document.Remember that official documents are more authoritative than all tutorials!

Before checking the specific document, please confirm that the official document you read is 1.12.2 version.

Because CRT is very different in the high and low versions, the official documentation of the wrong version of the wrong version will definitely cause an error!

After confirming, we found Vanlia in the left directory and opened it.

Then go down, find Events, and open.

Then find the EVENTS in the Events directory, and open it down. You can see that all events are among them.

Take physical damage as an example. If we need to write an event function to detect the source of damage when the entity is injured. If the source is withered, the damage is adjusted to 100.We must first find the "physical injury" event, and find the EntityLivingHurtevent page in the official document.

Entering the page, we immediately knew that the class to call this event needed to be introduced. In this way, the total framework of the event function was determined instantly!

as follows:

 Import Crafttweaker.events.ieventmanager;

Import crafttweaker.event.entitylivingHurtevent;

events.onentitylivingHurt (Function (event as EntitylivingHurtevent) {{

[Code]

});

Next, we only need to write sentences inside the large brackets.

On the EntityLivinghurtevent page, we can know that this incident faces two objects that can use Zengetter, namely:

DAMAGESOURCE, the type is IDAMAGESOURCE, indicates the damage source of the damage of the entity.

Amount, the type is Float, indicates the value of the entity being harmed.

In addition, amount can be repaid through Zensetter.

Obviously, we have to determine whether the source of damage is withering, and we must use DamageSource.

But the data type of this object is Idamagesource, and the body as the wither does not belong to the same data type.

Therefore, we need to continue to find ways through the objects faced by DamageSource.

It can be seen that the IDAMAGESOURCE on this page is a marked blue, which means that the hyperlink can be directly linked to the type of IdamageSource.

On the IDAMAGESOURCE page, many objects can be seen.

According to the above steps, compare them one by one, as follows.

In the end, we found that it can be compared:

Is the IDAGESource (IENTITY type?) DEFINITION (IENTITYDEFINITION type) -oriented ID -oriented ID is judged by the ID of the withering.

Therefore, we can fill the code, of course, we can use a statement for local variables to make the sentence easier.

as follows:

 Import Crafttweaker.events.ieventmanager;

Import crafttweaker.event.entitylivingHurtevent;

events.onentitylivingHurt (Function (event as EntitylivingHurtevent) {{

Var source as IENTITY = EVENT.DAMAGESOURCE.TRUESource;

If (Source.Definition.id == .definition.id) {

Event.amount = 100.0F;

}

});

But we haven't finished writing. If we think about it, we find that not all the harm has the source of physical sources. If it is damaged by magma, there is no physical source, and the program will throw an empty pointer abnormal!

Therefore, we also need to perform Isnull checks, adding non -symbols to it, indicating that the value of the check is not output True when it is empty.

Subsequently, we used a number of ordinary data types, don't forget to import modules in each ordinary data type!

In the end, we completed the writing of the event function:

 Import Crafttweaker.events.ieventmanager;

Import crafttweaker.event.entitylivingHurtevent;

Import crafttweaker.damage.idamageSource;

Import crafttweaker.entity.ientity;

Import Crafttweaker.entity.ientityDefinition;

events.onentitylivingHurt (Function (event as EntitylivingHurtevent) {{

Var source as IENTITY = EVENT.DAMAGESOURCE.TRUESource;

If (! Isnull (Source) &&! Isnull (Source.Definition) && source.definition.id == .definition.id) {

Event.amount = 100.0F;

}

});

Part of the instance display

Forbidden reptiles to generate

 Import Crafttweaker.events.ieventmanager;

Import Crafttweaker.event.entityjoinWorldEvent;

Import crafttweaker.entity.ientity;

Import Crafttweaker.entity.ientityDefinition;

events.onentityjoinworld

Var definition = event.entity.definition;

If (! Isnull (definition) && definition.id == "minecraft: creeper") {{

Event.cancel ();

}

});

Forbidden player use instructions

 Import Crafttweaker.events.ieventmanager;

Import crafttweaker.command.icommand;

import crafttweaker.event.commandevent;

import crafttweaker.player.iplayer;

Events.onCommand (Function (Event as Commandevent) {{

If (event.commandSender Instanceof iPlayer) {var Player as iPlayer = Event.comMandSender;

If (! Player.creative &&! Event.commandSender.World.remote) {

Event.cancel ();

}

}

});

Cheating module detection

The code is written like this!Like to play accelerated torch so much?Then accelerate the torch, CHA into your PY, and accelerate your PY!

 Import Crafttweaker.events.ieventmanager;

Import crafttweaker.event.iplayErevent;

Import Crafttweaker.event.playerLoggedinevent;

import crafttweaker.player.iplayer;

Import crafttweaker.text.itextComponent;

static disallowedmods as string [] = [[] = [[]

"Torcherino", "LastSword", "Lolipickaxe", "Manaita"

];

function badmodloaded () as bool {

For mod in disallowedmods {

IfadedMods Has Mod) {

Return true;

}

}

Return false;

}

Events.onPlayerLoggedin (Function (event as playerLoggedinevent) {{

Var Player as iPlayer = EVENT.Player;

If (badmodloaded ()) {

Player.SendrichtextMessage (ItextComponent.fromtranslation ("test.cheatmod"); for mod in disallowedmods {

IfadedMods Has Mod) {

Player.Sendchat (loadedmods [mod] .Name+loadedmods [mod] .Version);

}

}

}

});

// LoadedMods is a global keyword. The role is to include the currently loaded module into a array

//test.cheatmod is not the content displayed in the game. You need to cooperate with the Resource Loader module to create a. Lang language file in the corresponding folder

Crafttweaker game in -game command

Prefix and role

Crafttweaker adds some commands that can help you create scripts and reduce the development time of writing scripts.

The prefix of the command is: /crafttweaker or /ct

You can also use these aliases: /minetweaker or /mt

All commands in the game can be found through the following ways: /ct Help

Command list

Command grammar description biological group/ct biomes

List all the biological groups in the game.

Biological group type

/ct biometypes

List all the types of biological groups in the game.

Block information

/ct blockinfo

Enable or disable the square information reader.In the enable block information mode, right -click the square and put the name, metadata and Tilentity data of the output block.

Block/CT Blocks outputs all the block names in the game to the Crafttweaker. Log file (logo file).

Tracking

/CT Bugs

Open the GitHub error tracker in the browser.

Synthetic table conflict

/CT Conflict

Output the list of all conflict production table formulas to the Crafttweaker. Log file (effective after installing Jei).

Discord convenient access

/CT Discord

Open the official Discord channel of Crafttweaker in the browser.

Official documentation

/CT DOCS

Open the official document page in the browser (the same as /CT Wiki).

Export script modification content

/ct dumpzs

Convert ZenScript to HTML files to the crafttweaker_dump folder in the Minecraft directory.

The entity/CT Entities output all the entities in the game to the craftweaker.log file.

Item

/CT GIVE

Use Crafttweaker's pointed brackets to call the player with items, so you can call it by adding. Withtag () to apply tags (non -special cases do not need to be used).

Check the items in the hand/CT Hand to see the ID and its NBT tags held in your hand (if so), you will directly provide a shear plate to allow you to replicate and paste quickly.Inside items

/CT Inventory

Output all the items in the item bar to the Crafttweaker. Log file.

Jei class/CT Jeicategories output all registered jei class to Crafttweaker. Log files (valid only after installing Jei).

Json format

/ct json

Out the NBT data of the items in your hand as the JSON output to the chat bar.This format is different from the IDATA format used by Crafttweaker.The shear plate will be provided directly to allow you to replicate and paste quickly.

The fluid/CT liquids output all the fluids in the game to the Crafttweaker. Log file.

Open the log/ct log

Output a link to open the crafttweaker.log file directly.

The module/CT MODS outputs all modules and versions in the game to the Crafttweaker. Log file and is displayed in the chat bar.

thing

/ct names [category]

Output all the items in the game to the crafttweaker.log file.The Category parameters are optional. You can fill in the parameters in the appendix to make the item information output in the log more comprehensive.

NBT/CT NBT output your eyes at the NBT data of the square or handheld item to the Crafttweaker. Log file.

Mineral dictionary

/CT Oredict

Output all the mineral dictionaries in the game and the items contained in this mineral dictionary to the Crafttweaker. Log file.If the name parameter specifies, only the name represents the items under the mineral dictionary.

Status effect/CT PotionS output all status effects in the game to the Crafttweaker. Log file.

Formula name/CT Recipenames output all the formula names in the game to the Crafttweaker. Log file.You can specify the MODID parameter to filter the result.

Formula/CT Recipes

Output all the synthetic formulas in the game in the form of a recipe function to the Crafttweaker. Log file.

Furnace formula/CT Recipes Furnace

Output all the furnace formula in the game in the form of a recipes function to the Crafttweaker. Log file.

Handheld item formula

/CT Recipes Hand

Export all the recipes of the synthetic handheld item in the game in the form of the recipet function to the Crafttweaker. Log file.

Open the script folder

/CT scripts

Open the Scrips folder in the game directory, which can be executed by the server console.

Seed registry

/ct seeds

Output all the items in the seed registry to the crafttweaker.log file.

Statement

/ct syntax

Check all scripts and output all grammar errors found.This is not a hot load instruction.Crafttweaker does not support thermal load on Minecraft 1.12.2.

Wiki

/ct wiki

Open the official document page in the browser (the same as /CT DOCS).

Zslint

/ct zslint

Start the zslint socket.

Appendix:/CT Names parameter table

Parameter content Burntime

The burning time of items as fuel

CreativeTabs

Create backpack bar of items

damageable

Can the items be damaged (whether it is durable)

disch

Display name of items

Enchantability

The enchantment ability of items (see Minecraft-Wiki's "Magic Calculation Mechanism" for details))

FOODVALUE

Nutritional value of food

maxdamage

Maximum durability of items

maxstack

The maximum number of stacks of items

maxuse

The use time of items (unit: tick)

Modrarity of Modid items

The scarcity of items affects the color of the item displayed

repairable

Can the item use an anvil

repaircost

The number of operations obtained by the items on the Iville

SaturationValue food is full of food

unloc

Unproof name of items

Module linkage

Content Tweaker

ContentTweaker allows creating blocks, items, fluids and other contents through Zenscript.

ContentTweaker game in -game command

ContentTweaker extended the command provided by Crafttweaker.

To access these commands, you need to execute the same operations as the Crafttweaker command, and use /Crafttweaker or /CT prefix.

Command grammar description Block material

/ct blockmaterial

Output all the block materials in the game to the Crafttweaker. Log file.

Create mode item bar

/CT CreativeTab

Output all the creative mode items in the game to the Crafttweaker. Log file.

Sound event

/ct soundEvent

Output all the sound events in the game to the crafttweaker.log file

Sound

/ct soundType

Output all the sound types in the game to the crafttweaker.log file.

Resource folder

The first thing after installing ContentTweaker is not to rush to watch the tutorial and write scripts, but quickly start Minecraft.

Exit after starting.We found that there was an additional resource folder in the root directory.

Tip: The Resource Loader of the Resource Load (Resource Loader) folder is compatible. The tutorial is recommended to install the module together.

Enter the Resources folder, there is also a ContentTweaker folder in it, enter.

It can be found that there are five folders in the ContentTweaker folder, namely: blockstates, lang, models, sounds, textures.

These five folders are responsible for storage: block state files, language files, model files, sound files, material files.

Material foundation

Although the main teaching script of the tutorial, the basic content of these Minecraft materials must be mastered.

BlockState is the additional data required to further define a block, including the appearance and behavior of the block, and the file format is JSON.In most cases, a block corresponds to a block state, but there is also an example.

For example, in the 1.12.2 version, the furnace has two types of blocks: "extinguishing melting furnace" and "burning furnace".The torch also has two types of blocks: "torch" and "torch on the wall", so the actual block and block status are not one -to -one.

The model is divided into block models and items models, and the file format is also JSON.

The block state needs to call the block model, but the block state and the block model are still not a one -to -one correspondence.

For example, this block state on the wall contains the four variants of "Facing = East", "Facing = West", "Facing = SOUTH" and "Facing = NORTH", corresponding to four block models.

These four variants only call one example file: Wall_TORCH.JSON, but rotate on it.

For items, there are no states of items. There are only three documents: items model, item material and the name of the item.Therefore, for items, it is only necessary to store files in the three folders of Models/Items, LANG, Textures/Items.

The material is divided into square materials and items, and the file format is PNG.

The block model needs to call the square material, but you must understand that the block model and the square material are still not a corresponding relationship.

For example, there are three different stickers at the bottom, side, and surface of it, and one model corresponds to three materials.

The block state can also directly call the square material, and skip the block model.

Item model calls material material.

The material can be static or dynamic.But always .png format, otherwise it will cause material errors.

To make the block or item texture display normally, their width and height must be equal (if it is a dynamic texture, if the height is multiple of the width); otherwise, the texture of the black -purple square grid is only displayed.For most other textures, the files are stretched to meet the required size.

The format of the language file is LANG.

The internal storage is the key value pair.Don't tell me what the key value is right now.If so, it is recommended to study part 4.The key is the localized key name, and the value is the name that items or blocks show in the game, also known as the localization name.

Localization key format of the block: Tile.ContentTweaker.Blockname.name, where BlockName is the unprecedented name of the block.

Localization of the item: Item.contentTweaker.itemname.name, where itemname is the unprecedented name of the item.

Create a square

Use ContentTweaker to create new things. You need to use #Loader ContentTweaker pre -processor to ensure that the script is loaded by ContentTweaker instead of the original Crafttweaker.

Creating blocks need to import two modules from ContentTweaker, which are Vanillafactory and Block.

Through the following example, we can create a square:

#loader contenttweaker

Import Mods.ContentTweaker.Vanillafactory;

Import Mods.ContentTWEAKER.BLOCK;

var antiiceBlock = vanillaFactory.createBlock ("Anti_ice", );

// What kind of properties can be defined in the nature of the following blocks?

// Please refer to the official document by yourself: https://docs.blamejared.com/1.12/zh/mods/contenttweaker/vanilla/creata_Content/block/block

antiiceBlock.SetLightOPACITY (3); // opaque

antiiceBlock.SetlightValue (0); // its own brightness

antiiceBlock.setBlockhardness (5.0); // hardness hardness

antiiceBlock.setBlockResistance (5.0); // explosion resistance

antiiceBlock.SettoolClass ("Pickaxe"); // Collection tool

AntiiceBlock.SettoolLevel (0); // excavate level

antiiceBlock.SetBlockSoundType

antiiceBlock.setslipperines (0.3); // Smooth degree

antiiceBlock.register ();

Among them, the Anti_ice of the 4th line is the unprepared name of the block.

In this way, this block is indeed registered in the game, but now it has no material or name.

Through the instruction /GIVE @s ContentTweaker: Anti_ice, you can get the block.We see that not only the material is purple and black, the name is also chaotic.

This requires us to prepare a suitable, long and width of PNG pictures, and rename the name of the name of this picture to the unsmooth name of the block. Here is anti_ice.

Then move this picture to Resources/ContentTweaker/Textures/Blocks.In this way, the material of the block appears.

As for the name, we need to create a new file under the Resources/ContentTweaker/LANG folder, the file is named zh_cn

Tip: zh_cn means simplified Chinese. If you want to write English (American) name, set the file name to EN_US into this file, write the following key value pairs, and let the localized key name and localized name be established one by oneCorrespondence relationship:

 Tile.ContentTweaker.anti_ice.name = Anti -ice 

After saving, re -enter the game, and the creation of a square is completed.

Create an item

For items, the creation process and square are very similar.

It is just that the localization key format of the two in the language file, and the material materials need to be placed in the items folder under the Textures, not the Blocks folder.

Let's give a example below:

#loader contenttweaker

Import Mods.ContentTweaker.Vanillafactory;

Import Mods.ContentTWEAKER.ITEM;

var zsitem = vanillaFactory.createitem ("ZS_Item");

// Item nature: https: //docs.blamejared.com/1.12/zh/mods/contenttweaker/vanilla/creata_Content/item

Zsitem.maxstacksize = 8; // Maximum stack number

zsitem.rarity = "rare"; // Rare degree

zsitem.creativetab = zscreatingtab; // Create backpack bar

zsitem.smeltingExperine = 10; // Melving gains experience

zsitem.ToolClass = "Pickaxe"; // Tool type

zsitem.Toollevel = 5; // Digging level

zsitem.beaConPayment = true; // Whether it can be used for the beacon

zsitem.ItemrightClick = Function (Stack, World, Player, Hand) {

Commands.call ("Scoreboard Players Set @p Name 5", Player, World);

Return "pass";

// Right -click on handheld items to execute the above code

};

zsitem.register ();

Create a fluid

If you make it, you don't need to teach.Specifies directly:

#loader contenttweaker

Import Mods.ContentTweaker.Vanillafactory;

Import Mods.ContentTweaker.flum;

Import Mods.ContentTweaker.Color;

var ZSFLUID = vanillafactory.createFLUID ("ZS_FLUID", color.fromhex ("ff69b4"); Eaker/Vanilla/Creatable_Content/Fluid

zsfluid.material = ; // fluid material

ZSFLUID.Temperature = 1300; // fluid temperature

zsfluid.register ();

There is no need to provide materials for fluids, because the fluid material is nothing more than water or lava.The color of the fluid is defined in the fifth line of the above script.

I have provided you with a link to three official documents, and you will always check it yourself!Check it yourself in the future.

Create craftsmanship materials

ContentTweaker links the artisan soul, you can use it to customize the artisan soul material.

Format is like creating blocks, items, and fluids, which is very simple.

The artisan soul material only needs to provide its localized name in the RECOURSES folder. In addition, it does not need to provide any materials, models, and so on.

#loader contenttweaker

#Modloaded tconstruct

value = mods.contenttweaker.tconStruct.Mater later.create ("Flower");

testmat.color = 0x8e661b; // material color

testMat.Craftable = TRUE; // Whether to use parts processing table

testMat.liquid = ; // The fluid formed after melting (if testmat.castable = false can be omitted)

testMat.Castable = false; // Whether to use smelting furnace

testMat.additem (); // Component processing table or the items required by the smelting furnace

TestMat.RePreStIVEITEM = ; //

TestMat.addheadmaticstats (100, 1.5F, 5.5F, 1); // The material as the top (in order: durability, attack speed, attack power, excavation level)

TestMat.addhandlematicstats (0.3, 500); // The attributes of the material when the material is the handle (in order: the handle coefficient, durable)

testmat.addbowstringmateriLSTATS (0.5F); // The material as the attribute when the material is bowed (in order: enhancement)

testMat.LocalizedName = "Flower"; // Localized name, you can use the game.localize () function to call the localized key name testmat.register ();

Combined with the above knowledge, there are the following instances (from the "polymerization matrix" in the integrated package: GreedyCraft):

First create a new fluid, then create a material, and finally add features to the material.

#loader contenttweaker

#Modloaded tconstruct

// Import module

Import Crafttweaker.liquid.iliquidstack;

Import crafttweaker.game.igame;

Import Mods.ContentTWEAKER.TCONSTRUCT.MATERIAL;

Import mods.contenttweaker.tconstruct.matialBuilder;

Import Mods.ContentTweaker.flum;

Import Mods.ContentTweaker.Vanillafactory;

Import Mods.ContentTweaker.Color;

// Create a new fluid

Val molten_fusion_matrix = vanillafactory.createfluid ("fusion_matrix", color.fromhex ("4A148C"). GetintColor ());

molten_fusion_matrix.material = ;

molten_fusion_matrix.viscosity = 2000;

molten_fusion_matrix.denSity = 4000;

molten_fusion_matrix.rarity = "EPIC";

molten_fusion_matrix.colorize = true;

molten_fusion_matrix.temperature = 2800;

molten_fusion_matrix.luminoSity = 15;

molten_fusion_matrix.color = color.fromhex ("4A148C"). Getintcolor ();

molten_fusion_matrix.stillLocation = "Base: Fluids/Molten";

molten_fusion_matrix.flowIntLocation = "Base: Fluids/Molten_flowing";

molten_fusion_matrix.register ();

// Create an artisan soul material

value_matrix = materialbuilder.create ("fusion_matrix");

fusion_matrix.color = color.fromhex ("4A148C"). Getintcolor ();

fusion_matrix.craftable = false;

fusion_matrix.castable = true; fusion_matrix.RepResntativeITEM = ;

fusion_matrix.addity ();

fusion_matrix.liquid = ;

fusion_matrix.localizedName = "Polymerization Matrix";

fusion_matrix.addheadmaterialstats (12000, 13.6, 18.9, 8);

fusion_matrix.addhandlematerialstats (1.8, 625);

fusion_matrix.adDextramateriAlstats (820);

fusion_matrix.addbowmaterIlstats (Getdrawspeed (1.2) as float, 1.2, 9.6);

fusion_matrix.addarrowshaftmaticstats (1.75, 40);

fusion_matrix.addprojectilematicmaterstats ();

// Add features to the material

fusion_matrix.addmatictrait ("TCONEVO.Overwhelm", "Head");

fusion_matrix.addmatictrait ("Dense", "Head");

fusion_matrix.addmatictrait ("Dense", "Handle");

fusion_matrix.addmatictrait ("Dense", "Extra");

fusion_matrix.addmatictrait ("DENSE_ARMOR", "Core");

fusion_matrix.addmatictrait ("shielding_armor", "core");

fusion_matrix.addmatictrait ("first_guard_armor", "core");

fusion_matrix.addmatictrait ("DENSE_ARMOR", "Plates");

fusion_matrix.addmaterialtrait ("first_guard_armor", "Plates");

fusion_matrix.addmatictrait ("DENSE_ARMOR", "Trim");

fusion_matrix.addmatictrait ("first_guard_armor", "trim");

fusion_matrix.addmatictrait ("TCONEVO.Overwhelm", "Bow");

fusion_matrix.addmatictrait ("" DENSE "," Bow "); Fusion_matrix.addmatictrait (" HOVERING "," Shaft ");

fusion_matrix.register ();

Customize the characteristics of craftsmanship materials

The characteristics of the creation of the material are not the above -mentioned assembly lines.

Except for the basic format and the creation of artisan soul materials, we need to combine the event function.

In simple terms, these surfaces such as display colors, descriptions, etc. are similar to the four guys above, which is easy to deal with.

But the specific effects of the characteristics are different. This requires a function to write through functions. In essence, it is actually something similar to an event function.

We take an example from the greedy integration package of the old friend (omitted the import module and the localized key name):

 Val Gambletrait = TrartBuilder.create ("Gamble");

gambletrait.color = color.fromhex ("FFA000"). GetintColor ();

gambletrait.localizedName = "Gambling";

Gambletrait.localizedDescription = "This is a face -seeing world";

Gambletrait.calcdamage = Function (Trart, Tool, Attacker, Target, OriginalDamage, NewDamage, Iscribeical) {

Var dmg = newDamage;

Var rand as dough = math.random ();

If (RAND <0.15) {

Dmg = newDamage*2 as float;

} Else if (RAND <0.45) {

Dmg = newDamage/2 as float;

}

Return dmg;

};

gambletrait.register ();

From the above examples, we can see that the format of the 1st to 4th and the custom artisan soul material is almost consistent, and there is nothing to say.

However, from the fifth line, we seemed to see the shadow of the event function.

However, this is not a real event function. This function is not the event of the Crafttweaker, but the event of the ContentTweaker.

ContentTweaker has less events supporting monitoring, but it is completely enough.

You can find all the ContentTweaker events on the htttentweaker event on the https :blamejared.com/1.12/zh/mods/contenttweaker/tinkers_construct/traitbuilder page.How to write innovation depends on your personal programming ability and brain hole.

Modtweaker

Tutorial format

Modtweaker can customize the synthetic formula of other modules.It is the first choice for Crafttweaker to link other modules!

Tutorial format: module.function (Type Variable, Type Variable, ...);

Among them, Module represents the imported module; function indicates a function that adds modifications or delete formulas, such as adDRecipe, RemoveRecipe, etc.;

Type represents the data type of variables; Variable represents variables. The name of the variable represents its role in the formula, such as Input represents the items required by the formula, Output represents the items obtained by the formula.

In addition to telling you the format, the tutorial will give you an example, so it doesn't matter if you don't understand the format. It is also a way to understand the instance.

The most basic to modify the formula is to delete first and then increase.

Be sure to import the module!

Practical Development -Actually Additions

Atomic reconstruction

 Import Mods.ActuallyadDitions.atomicReConStructor;

// Add the format format:

// AtomicRoconStructor.addrecipe (IITEMSTACK OUTPUT, IITEMSTACK Input, Int EnergyUSED);

// The following instances indicate that the energy of the atomic recreation machine consumes 1,000 units to convert the coal into a flame bomb

AtomicReConStructor.addrecipe (, , 1000); 1000); 1000); 1000); 1000); 1000); 1000); 1000); 1000);

// Delete the format format:

// AtomicReconstructor.removeRecipe (IITEMSTACK OUTPUT);

// The following examples indicate that delete all the recipes that synthesize coal through the atomic recreation machine

AtomicReConStructor.removerecipe ();

Wool ball

 Import Mods.ActuallyadDitions.Balloffur;

// Add the format format:

// Balloffur.addreturn (IItemstack Output, Int CHANCE);

// The following examples indicate that the weight of the use of the hair ball has 5 weights to obtain the line

Balloffur.addreturn (, 5);

// Delete the format format:

// Balloffur.RemoveReturn (IITEMSTACK OUTPUT);

// The following examples indicate that deleting the formula that may obtain coal using the hair ball

Balloffur.removeReturn

Fertilizer

 Import Mods.Actuallyadditions.compost;

// Add the format format:

// Compost.addrecipe (IItemstack Output, IItemstack Outputdisplay, Iitemstack Input, Iitemstack InputDisplay); // The following instances indicate that the use of sugar can be fermented with sugar, sugar, sugar The material displayed in the compost machine is square snow, and the soil is in the compost machineThe material displayed in it is block soil

Compost.addrecipe (, , , );

// Delete the format format:

// Compost.removeRecipe (Iitemstack Output);

// The following examples indicate that delete all the recipes that obtain rapeseed seeds through the fermentation of the fertilizer machine

Compost.removeRecipe ();

Grinding machine

 Import Mods.ActuallyadDitions.crusher;

// Add the format format (@Optional represents options):

// Crusher.Addrecipe (IItemstack Output, IItemstack Input, @Optional Iitemstack OutputSecondary, @Optional IntoneCondaryChaance)

// The following examples indicate that the grinding powder grinds an iron mine to get an iron ingot, and at the same time, there is a 50%probability of output of by -product stones

Crusher.addRecipe (, , , 50);

// Delete the format format:

// Crusher.removerecipe (Iitemstack output);

// The following examples indicate that delete all the formulas that get the gold ingot through the grinding machine

Crusher.removerecipe ();

Charging table

 Import Mods.ActuallyadDitions.empowerr;

// Add the format format:

// Format 1: EMPOWERER.ADDRECIPE (IITEMSTACK OUTPUT, IITEMSTACK Input, IITEMSTACK MODIFIER1, IITEMSTACK MODIFIER2, Iitemstack Modifier3, Iitemstack M Odifier4, int ENERGYPERSTAND, int Time);

// Format 2: EMPOWERER.ADDRECIPE (IITEMSTACK OUTPUT, IiteMStack Input, IITEMSTACK MODIFIER1, IITEMSTACK MODIFIER2, IITEMSTACK MODIFIER3, IitemStack Mod ifier4, int Energypertand, int Time, float [] particlecolourRray); // as followsIn the case of redstone in the item display box, the leaves are converted into iron ingots, and each item display box consumes the energy of 500 units.

Empowerer.addRecipe (, , , , , , 500, 100);

// Delete the format format:

// empowerer.removerecipe (IITEMSTACK OUTPUT);

// The following examples indicate that delete all the formulas that obtain energy iron crystals through the charging platform

Empowererer.removerecipe ();

Miner lens

 Import Mods.ActuallyadDitions.minINGLENS;

// Add the format format:

// Convert stones into ore: miningLens.addstoneore (IORDICENTRY OR, int weight);

// Convert Hell Rock into ore: miningLens.addnetherore (IOREDICENTRY ORE, Int Weight);

// The following example 1 indicates that the weight of the miner's lens has a weight of 2 to convert the stone into iron ore into iron ore

// The following example 2 indicates that the weight of the miner's lens has a weight of 5 to transform hell rock into gold ore

MiningLens.addstoneore (, 2);

MiningLens.addnetherore (, 5);

// Delete the format format:

// Delete the conversion stone formula: miningLens.removestoneore (IOREDICENTRY OR);

// Delete the conversion of hell rock formula: miningLens.removenettherore (ioreDictical ol);

// The following example 1 indicates that delete all the formulas that convert stones into iron ore through the miner lens

// The following example 2 indicates that delete all the formulas that convert Hell rock into gold ore through the miner lens

MiningLens.removestoneore ();

MiningLens.removenetherore ();

crude oil generator

 Import Mods.Actuallyadditions.oilgen;

// Add the format format (@Optional represents options):

// Oilgen.addrecipe (IliquidStack Fluid, Int Genamount, @optional Int Gentime);

// Gentime Stay in emptiness and default to 100

// The following examples indicate that the crude oil generator consumes 50 MB of magma every 10 Tick, and the energy of 1,000 units per TICK generates

Ilgen.addrecipe (, 1000, 10);

// Delete the format format:

// Oilgen.removeRecipe (IliquidStack Fluid);

// The following examples indicate that delete all the recipes that consume water power generation through crude oil generators

Oilgen.removerecipe ();

Treasure chest

 Import Mods.ActuallyadDitions.treasureChest;

// Add the format format:

// Treasurechest.addloot (IITEMSTACK RETURNITEM, Int CHANCE, Int MINAMOUNT, Int Maxamount);

// The following examples indicate that opening the treasure chest with 50 weights to get the minimum number of 1, and the maximum number of 64 is soil, 64

TreasurecheSt.addloot (, 50, 1, 64);

// Delete the format format:

// Treasurechest.removeLoot (IITEMSTACK RETURNITEM);

// The following example indicates that deleting the formula that can get golden grains that may get golden grains

Treasurechest.removeLoot ();

Better with Mods

Soul Steel Evapa

 Import Mods.betterwithmods.anvil;

// Since the old bug of Modtweaker, the formula written in the script and the actual formula will be folded along the diagonal

// The new version of Modtweaker has added a new method to repair this bug, so this tutorial will only explain the new method

// Add the format format:

// anvil.addshapetfixed (IITEMSTACK OUTPUT, INGREDIENT [] [] inputs);

// The following example indicates that according to the items in the two -dimensional array, generate a formula for synthetic dirt

Anvil.addshapedfixed (, [[[[[

[, , , ], [, , , ecraft: Stone>],,,

[, , , ],

[, , , ]

]);

// Delete the format format (@Optional represents options):

// anvil.removeShapedfixed (IItemstack Output, @optional INGREDIENT [] [] inputs);

// If INPUT stays empty, according to OutPut, delete all formulas that synthesize output through the Soul Moisturizing Steel and Steel

// The following examples indicate that delete a single formula that synthesizes the specified items by the items in the two -dimensional array through the Soul Snaping Ivil

Anvil.removeShapetfixed (, [[[[[[DIRT>, [[[[[

[, , , ],

[, , , ],

[, , , ],

[, , , ]

]);

Bang

 Import Mods.betterwithmods.bellows;

// This recipe allows you to customize the distance between the items to be blown away by the box.

// bellows.set (Itemstack Stack, Float Value); Float Value);

// Among them, the value of value is (0, 128]

// The following example indicates that the leaves will be blown by the fan 5 grid

Bellows.set (, 5.0F);

buoyancy

 Import Mods.betterwithmods.buoyancy;

// This formula is only effective when it enables HCBUOY in Better with Mods

// This recipe allows you to customize the buoyancy of the items. The format is as follows:

// Buoyancy.set (Itemstack Stack, Float Value); Float Value);

// Among them, the value of value is [-1, 1]. The larger the number, the larger the buoyancy, and -1 means completely sinking, 1 means floating on the water surface

// The following example indicates that the iron block will sink the bottom in the water

Buoyance.set (, -1.0F);

Hot source registered

 Import Mods.betterwithmods.heatregification;

// The thermal source registrar can allocate an integer value to interact with the iconic and kiln, that is, customized blocks that can be used for heating.

// By default: 1 indicates the original version of the fire, 2 indicates the blue fire

// Add custom heat source (Method 1):

// Heatregitive.addheatsource (Itemstack Stack, Int Heat);

// Stack this item stack must have its corresponding square

// The following example indicates that the lower bound rock is used as a thermal source with a level of 1 (the level is equal to the original fire)

Headregistry.addheatsource (, 1);

// Add custom heat source (Method 2):

// Heatregitive.addheatsource (IBLOCKSTATE Stack, Int Heat);

// The following example indicates that the lower bound rock is used as a thermal source with a level of 1 (the level is equal to the original fire)

Headregistry.addheatsource (, 1);

// Add custom heat source (Method 3):

// Heatregitive.addheatsource (IBLOCKSTATE [] Stacks, IITEMSTACK DisplayStack, Int Heat);

// When it is mostly used in the corresponding block of a certain item, when there are multiple blocks in the corresponding block, see the concept of the state of the block. For details, please refer to the material basis of 8.2

// No examples yet

Pocket

 Import Mods.betterwithmods.caultron

// Add the basic formula format:

// Need the original fire: cauldron.adDunStoked (IINGREDIENT [] inputs, IItemstack [] outputs);

// Need blue fire: cauldron.addstoked (IINGREDIENT [] inputs, IiteMStack [] outputs);

// The following example indicates that the pot pot is made into stones

Cauldron.addstoked ([], []); // Delete the format format:

// cauldron.remove (IITEMSTACK [] outputs);

// The following examples indicate that delete all the formulas that have obtained stones through the kettle pot

Cauldron.remove ([]);

// The following examples indicate all the formula of deleting the kettle pot

Cauldron.removeall ();

// Add the advanced format format:

// cauldron.builder ()

// .buildRcipe (INGREDIENT [] inputs, Iitemstack [] outputs)

// .setpriority (int Priority)

// .setheat (int head)

// .setignorehead (Boolean Ignoreheat)

// .build ();

// The following example indicates that under the heating of the blue fire, the pot can be made into the soil.

// Setheat represents the required heat level, which can customize the heat source and calories through the thermal source registrar to customize

Cauldron.builder ()

.BuildRecipe ([], [])

.Setheat (2)

.Setpriority (-1)

.Build ();

Bleak

 Import Mods.betterwithmods.crucible;

// Add the basic formula format:

// Need the original fire: Crucible.adDunStoked (IINGREDIENT [] inputs, IItemstack [] outputs);

// Need blue fire: Crucible.addstoKed (IINGREDIENT [] inputs, IiteMStack [] outputs);

// The following example indicates that the stones are made into stones

Crucible.addstoked ([], []);

// Delete the format format:

// Crucible.remove (IITEMSTACK [] outputs);

// The following examples indicate that delete all the formulas that have been refined by the stones

Crucible.remove ([]);

// The following examples indicate all the formula of deleting 坩埚

Cracible.removeall ();

// Add the advanced format format:

// Crucible.builder ()

// .buildRcipe (INGREDIENT [] inputs, Iitemstack [] outputs)

// .setpriority (int Priority) // .Setheat (int head)

// .setignorehead (Boolean Ignoreheat)

// .build ();

// The following example indicates that under the heating of the blue fire, the stones are made into dirt

// Setheat represents the required heat level, which can customize the heat source and calories through the thermal source registrar to customize

Crucible.Builder ()

.BuildRecipe ([], [])

.Setheat (2)

.Setpriority (-1)

.Build ();

Kiln

 Import Mods.betterwithmods.kiln;

// Add the basic formula format:

// Kiln.add (IINGREDIENT Inputs, IItemstack [] outputs);

// The following examples indicate that the kiln is made of stones into stones

Kiln.add (, []);

// Delete the format format (delete according to the output):

// kiln.remove (IITEMSTACK [] outputs);

// The following examples indicate that delete all the formulas that obtain stones through the kiln

Kiln.remove ([]);

// The following examples indicate all the formula of deleting the kiln

Kiln.removeall ();

// Delete the format format (delete according to input)

// kiln.remove (ingredient input);

// The following examples indicate that delete all the formula entered in the kiln

Kiln.remove ();

// Add the advanced format format:

// kiln.builder ()

// .buildRcipe (IINGREDIENT Inputs, IITEMSTACK [] outputs)

// .setpriority (int Priority)

// .setheat (int head)

// .setignorehead (Boolean Ignoreheat)

// .build ();

// The following example indicates that under the heating of the blue fire, the kiln has refined the stone into soil.

// Setheat represents the required heat level, which can customize the heat source and calories through the thermal source registrar to customize

Kiln.builder ()

.BuildRecipe (, [])

.Setheat (2)

.Setpriority (-1) .build ();

Filter

 Import Mods.betterwithmods.filteredhopper;

// Add filtering rules and add representatives for this rule

// The format is as follows: Filteredhopper.addfilter (String name, iveredient item)

// The following example indicates that adding a filtering rule called "Modtweaker: MyFilter", and triggers when installing wooden boards in the funnel slot

Filedhopper.addfilter ("Modtweaker: MyFilter", );

// Add items allowed to pass to a certain rule

// The format is as follows: Filteredhopper.addfiltemtITEM (String name, ivient item)

// The following examples indicate that when the filter sieve is filtering the filtering rule using "MODTWEAKER: MyFilter", the iron ingot can pass through

Filedhopper.addfilteredITEM ("MODTWEAKER: MyFILTER", );

// Add the format format:

// filedhopper.addfilterRecipe (String name, ingredient input, iveredient [] insideoutput, ionRedient [] utsideoutput);

// Among them, InsideoutPut represents the product output to the funnel inventory, Outsideoutput represents the product that pops up to the top of the funnel

// Note that InsideoutPut and OutsideoutPut are not options. If you want to leave empty, you need to fill in the empty array []]

// The following examples indicate that when the filter sieve is used "MODTWEAKER: MyFilter" filtering rules, when encountering grass squares, it will be stored in a vermiculite in the funnel, and 9 diamonds will pop up above it.

Filedhopper.addfilterRecipe ("MODTWEAKER: MyFILTER", , [], [*9]);

// Remove all the approved items under a certain rule

// The format is as follows: filedhopper.Clearfilter (String name);

// The following examples indicate all the allowable items that are allowed to remove the rules "Betterwithmods: WICKER"

Filedhopper.Clearfilter ("Betterwithmods: Wicker");

// Delete the format format:

// Delete according to the output: Filtemhopper.removerecipe (INGREDIENT [] inSideoutput, IINGREDIENT [] outSideoutput);

// Delete according to the input: Filteredhopper.removerecipeByinput (IINGREDIENT Input); // The following example indicates the formula of deleting all the formulas that output sand through the inventory and pop up the vermiculite in the inventory and pop up the vermiculite above.

Filedhopper.removerecipe ([], []);

// The following example indicates that delete all the recipes that enter the sand through filter sieve.

Filedhopper.removerecipeByinput

Furnace burning time

 Import Mods.betterwithmods.MISC;

// Set the burning time of items

// The format is as follows: Misc.SetFurnaceSmeltingtime (IINGREDIENT INGREDIENT, Int Time)

// Time's unit is tick

// The following example indicates that it takes about 83 minutes to bake a potato

MISC.SETFURNACESMELTINGTIME (, 100000);

Move speed on the square

 Import Mods.betterwithmods.movement;

// Set the speed effect that the player receives when walking on the square

// The format is as follows: movement.set (IITEMSTACK Stack, Float Value);

// The stack stack must have its corresponding block

// Value's value range is [0, 2], 1 is normal speed

// The following example indicates that the movement speed of the player on the ice cubes to 1.5 times the normal speed

Movement.set (, 1.5);

millstone

 Import Mods.betterwithmods.mill;

// Add the basic formula format:

// missdrecipe (ingredient [] inputs, IItemstack [] outputs);

// The following examples indicate that the grinding stones are grinded into stones

Mill.addrecipe ([], []);

// Delete the format format:

// miss.remove (IItemstack [] outputs);

// The following examples indicate that delete all the formulas that obtain stones through the millstones

Miss.remove ([]);

// The following examples indicate all the formula of deleting the millstone

Mill.removeal ();

// Add the advanced format format:

// miss.builder ()

// .buildRcipe (INGREDIENT [] inputs, Iitemstack [] outputs)

// .setpriority (int Priority)

// .setgrindtype (String SoundLocation) // .setticks (int Ticks)

// .build ();

// The following example indicates that the grinding stone grinds the soil to make the soil into stones for 3 seconds.

// setgrindtype represents the sound of grinding

Mill.builder ()

.BuildRecipe ([Minecraft: DIRT>], [])

.Setgrindtype ("Minecraft: Entity.ghast.scream"))

.Setticks (60);

.Build ();

Ballast

 Import Mods.betterwithmods.pulleyManager;

// Set the squares that can be pulled by the boat and the anchor

// The format is as follows: pulleymanager.addpulleyBlock (IBLOCKSTATE State);

// The following example indicates that the obsidian can be ticked by the bike anchor

Pulleymanager.addpulleyBlock ();

Screw saw

 Import Mods.betterwithmods.saw;

// Add the basic formula format:

// Saw.add (IINGREDIENT input, IITEMSTACK [] output);

// Input must have the corresponding block state

// The following example indicates that the screw saw cuts the fence into a wooden stick

Saw.add (, [, ]);

// Delete the format format (delete according to input):

// Saw.remove (IINGREDIENT Input);

// The following example indicates that delete all the formula entered into the fence in the screw saw

Saw.remove ();

// Delete the format format (delete according to the output):

// Saw.remove (IITEMSTACK [] outputs);

Screw rotation table

 Import Mods.betterwithmods.tuRntable;

// Add the basic formula format:

// Turntable.add (in@, @optional IItemstack ProductState, IITEMSTACK [] output);

// Input must have the corresponding block state. ProductState is the square that will be placed after the formula is completed (selected)

// The following examples indicate the use of screw rotation tables to process grass squares. After completion, place the soil and output the seeds

Turntable.add (, , []); // Delete the format format (deleted according to input):: deleted: deleted):

// tuRntable.remove (IINGREDIENT Input);

// Delete the format format (delete according to the productState):

// tuRntable.removerecipe (IItemstack ProductState);

// Delete all formula:

// tuRntable.removeall ();

// The format format of the formula of the formula:

// tuRntable.builder ()

// .optingalbulider

// .build ();

// The following is available OptionalBulider:

// (1) Set the input and output of the formula: .buildRcipe (INGREDIENT [] inputs, Iitemstack [] outputs))

// (2) Set the rotation speed required for the formula (default 8): .setrotations (int Rotations)

// (3) Set the square when setting the formula: .setproductState (IItemstack ProductState)

// The following examples indicate the use of screw rotation tables to process grass squares. After completion, place the soil and output the seeds, and the rotation speed of 10

TuRntable.builder ()

.BuildRecipe ([Minecraft: Grass>], []))

.SetproductState ()

.Setrotations (10)

.Build ();

Decorative block

 Import Mods.betterwithmods.miniblocks;

// This function is used to obtain the ingredient of a specific decorative block

// Get the format of the decorative block:

// miniBlocks.getminiblock (String Type, INGREDIENT PARENTBLOCK);

// Type must be one of "SIDING", "MOULDING", "Corner"

// "Siding" is a half -board, "MOULDING" is a piece, "Corner" is the corner

// ParentBlock is a piece of texture from MiniBlock from it. ParentBlock is an ingredient, so you can use Oredictionary

// The following examples indicate the half -board based on the obtaining all the wooden boards (whether it is oak or other types of wooden boards):

Miniblocks.getminiblock ("sign", );

Blood Magic 2 -Blood Magic 2 alchemy matrix

 Import Mods.bloodmagic.alchemyarray;

// Add the format format:

// Alchemyarray.addRecipe (IITEMSTACK OUTPUT, IITEMSTACK Input, IiteMStack Catalyst, @Optional String TextureLocation);

// Catalyst is the catalyst required by the formula

// The following example indicates that the grass is used as a catalyst, and the wooden stick is turned into a diamond:

Alchemyarray.addrecipe (, , );

// Delete the format format:

// Alchemyarray.removerecipe (IITEMSTACK Input, IItemstack Catalyst);

// The following example indicates the formula of deleting the input as redstone, and the catalyst is the formula of the demon slate:

Alchemyarray.removerecipe (, );

Alchemy table

 Import Mods.bloodmagic.alchemytable;

// Add the format format:

// Alchemytable.addrecipe (Itemstack Output, IITEMSTACK [] inputs, Int Syphon, INT TICKS, INT MINTIER);

// Inputs array can have up to 6 elements, Syphon is the LP value required by the formula

// Ticks is the time required for the formula.

// The following example indicates that using 3 dirt, use 0 levels of qi and blood, consume 20 LP, and pass 10 game carvings to synthesize diamonds:

Alchemytable.addrecipe (, [, , ], 20,10,0);

// Add the potion effect format format:

// Alchemytable.addpotionRcipe (IITEMSTACK [] inputs, iPotionEffect Effects, INT SYPHON, INT TICKS, INT MINTIER))

// Inputs array can have up to 5 elements, Syphon is the LP value required by the formula

// Ticks is the time required for the formula.

// The following example first defines a potion I (6000 tick) the potion effect of I (6000 tick) // indicates that a potion bottle, 1 carrot, 1 potato, use 0 qi blood orb, consume 20 LP, 10 game engraving, after 10 games,Pharmacy bottle that gets the effect of the potion:

var Pot = .makePotionEffect (6000, 1);

Alchemytable.addpotionRcipe ([, , ], POT, 20, 10, 0);

// Delete the format format (consistent with the delete the format of the potion):

// Alchemytable.removerecipe (IITEMSTACK [] inputs);

// Inputs array can have up to 6 elements

// The following example indicates that delete all formulas that enter 3 carrots and 1 bone meal at the alchemy table:

Alchemytable.removerecipe ([, , , ]);

Blood altar

 Import Mods.bloodmagic.bloodaltar;

// Add the format format:

// BloodalTar.addrecipe (IITEMSTACK OUTPUT, IITEMSTACK Input, Int Minimumtier, Int Syphon, Int Consumerate, Int Drainrate);

// Minimumtier is the minimum level that needs to meet the blood altar. This number should be smaller than the blood altar level you found in Jei, because it starts from 0

// Syphon is the LP value required by the formula. Consumerat is the rate of drawing LP value for the formula. After the DRAINRATE is exhausted for LP, the formula of the formation of the formula decreases rate.

// The following examples indicate the use of a level 1 blood altar, consume 20 LP, the consumption rate is 30, and the progress loss rate is 40 after the LP is exhausted.

Bloodaltar.addrecipe (, , 0, 20, 30, 40);

// Delete the format format:

// bloodaltar.removerecipe (IITEMSTACK Input);

// The following example indicates that delete all the formula entered in the blood altar:

Bloodaltar.removerecipe ();

Jailfire melting furnace

 Import Mods.bloodmagic.tartarge;

// Add the format format:

// TartaricForge.addRecipe (IItemstack Output, IItemstack [] inputs, Double MINSOULS, DOUBLE SOULDRAIN)

// Inputs array can have up to 4 elements, minsouls is the minimum will of the formula required by the formula.

// The following examples indicate the use of prison fire furnaces. Under the condition of reaching 10 will, consume 10 will, and turn 4 soil into diamonds:

TARTARICFORGE.ADDRCIPE (, [, , , ], 10,10);

// Delete the format format:

// TartaricForge.removerecipe (IITEMSTACK [] inputs);

// The following examples indicate that delete all formulas that entered 1 evil soul tears and 2 feathers in the jailfire melting furnace:

TARTARICFORGE.RemoveRecipe ([, , ];

Plant Magic -Botania

Plant magic related commands

Name grammar

/ct botbrews

Output all registered brewed lists to Crafttweaker. Log file

Ningjine orchid

/CT BotoreChid

Output the ore generated by all registered ore orchids and the list of opportunities for generating opportunities to Crafttweaker. Log file

Flower Pharmaceutical Formula

/CT Botania Apothecary

Output the list of all registered plant magic flower pills to the Crafttweaker. Log file

Brewing formula

/CT Botania Brews

Output the list of all registered plant magic brewing formulas to Crafttweaker. Log file

Elf Door Trading Form

/CT Botania Trands

Output the list of all registered elves trading formulas to Crafttweaker. Log file

Magic pond formula

/CT Botania Infusions

Output the list of all registered magic pool formulas to Crafttweaker. Log file

Paemel formula

/CT Botania Daisy

Output the list of all registered white daisy formulas to Crafttweaker. Log file

Rune altar formula

/CT Botania Altar

Output the list of all registered rune altar formulas to Crafttweaker. Log file

Plant Magic Dictionary

/CT BOTLEXCATS/BOTLEXENTRIES/BOTLEXTYPES/BOTLEXPAGES

Output the category/entry/knowledge type/page list of all registered plant magic dictionaries to CRAFTTWEAKER. Log file

Plant Magic Dictionary

 Import Mods.botania.lexicon;

// Add the dictionary page format:

// lexicon.addbrewPage (String name, String Entry, int Page_number, String Brew, IINGREDIENT [] recipe, string bottomtext); // lexicon.addcraftingpage ( String name, string entry, int page_number, string ... recipenames);

// lexicon.addelvenPage (String name, String Entry, int Page_number, IitemStack [] outputs, iveredient [] [] inputs);

// lexicon.adDentityPage (String name, String Entry, int Page_number, String Entity, Int Size);

// lexicon.addimagePage (String name, String Entry, int Page_number, String Resource);

// lexicon.addlorePage (String name, string entry, int page_number);

// lexicon.addinFusionPage (String name, String Entry, int Page_number, IITEMSTACK [] outputs, iveRedient [] inputs, int [] mana);

// lexicon.addalchemypage (String name, String Entry, Int Page_number, Iitemstack [] outputs, iveRedient [] inputs, int [] mana);

// lexicon.addConjurationPage (String name, String Entry, Int Page_number, Iitemstack [] Outputs, INGREDIENT [] inputs, int [] mana);

// lexicon.addpetalPage (String name, String Entry, int Page_number, IITEMSTACK [] outputs, iveRedient [] [] inputs);

// lexicon.addrunepage (String name, String Entry, int Page_number, IITEMSTACK [] outputs, iveRedient [] [] inputs, int [] mana); // lexicon.addtex TPAGE (String name, String Entry, int Page_number);

// Delete the dictionary page format:

// lexicon.removePage (String Entry, int Page_number);

// Add the dictionary format format:

// lexicon.addentry (String Entry, String Catagory, Iitemstack Stack);

// Delete the dictionary format format:

// lexicon.removentry (string entry);

// Add the dictionary category format:

// lexicon.addcategory (string name);

// Delete the dictionary category format:

// lexicon.removecategory (string name);

// Set the icon of the class:

// lexicon.setcategoryicon (String name, string icon);

// Add formula mapping to the dictionary:

// lexicon.addrecipemapping (IITEMSTACK Stack, String Entry, int Page);

// Delete formula mapping in the dictionary:

// lexicon.removerecipemapping (IItemstack Stack);

Plant magic formula modification

Modification of brewing formula

 Import Mods.botania.brew;

// Before modifying the brewing formula, you need to understand which brewing effects of plant magic register

// You can use the/CT BOTBREWS instructions to view, see the Telars Chapter 8 Chapter 2 Part 4, Part 1, Section 8

// Add brewing format format:

// brew.addrecipe (iveRedient [] input, String BrewName);

// The following examples indicate the effect of using hell warts, sugar cane, and red stone brewing:

Brew.addRecipe ([[, , ], "Speed"); "Speed");

// Delete the brewing format format:

// brew.removerecipe (string brewName);

// The following examples indicate the formula of deleting all brewing damage absorption effects:

Brew.removerecipe ("absorption");

Elf door transaction formula modification

 Import Mods.botania.elventrade;

// Add the format format of the elves door transaction:

// Elventrade.addRcipe (IINGREDIENT [] outputs, INGREDIENT [] input); // The following instances indicate that the soil and glass are traded in the elf door:

Elventrade.addrecipe ([], [, ]););););

// Delete the format format of the elves door transaction:

// Elventrade.removerecipe (IINGREDIENT OUTPUT);

// The following examples indicate that delete all the formulas that get the dream of dreaming through the elves:

Elventrade.removerecipe (IINGREDIENT OUTPUT);

Magic pond formula modification

 Import Mods.botania.manainfusion;

// Add Magic Pond Formula Format:

// Manainfusion.addinfusion (IItemstack Output, INGREDIENT Input, Int Mana);

// Manainfusion.addalchemy (IITEMSTACK OUTPUT, INGREDIENT Input, Int Mana);

// ManainFusion.addConjuration (Itemstack Output, INGREDIENT Input, Int Mana);

// Delete the format of the magic pond:

// Manainfusion.removerecipe (IINGREDIENT OUTPUT);

Ningjine orchid generating formula modification

 Import Mods.botania.orechid;

// For ore ore object, you can use ioreDiCENTRY or write the ID of the mineral resignation in the string format

// Registering two formulas with the same weight at the same time will collapse the game!

// Add the format format of the condensed ore orchid (using ioreDiCENTRY):

// Orechid.addore (IOREDICENTRY OORDICT, Int Weight);

// The following example indicates that the condensage mineral orchid generates logs, the weight is 500:

Ionid.addore (, 500);

// Add the format format of the condensate ore orchid (with string):

// Orechid.addore (String Oredict, Int Weight);

// The following example indicates that the condensage mineral orchid generates logs, the weight is 500:

Orechid.addore ("logwood", 500);

// Delete the format format of the condensate ore orchid (using ioreDiCENTRY):

// Orechid.removeore (IOREDICENTRY OORDICT);

// The following examples indicate that the condensed ore orchid is no longer renewed into gold ore:

Orechid.removeore ();

// Delete the format format of the condensed ore orchid (with string):

// Orechid.removeore (String Oredict); // The following examples indicate that the condensed ore orchid is not reappeared into gold ore:

Ionid.removeore ("olgold");

Yan Mine orchid generate formula modification

 Import Mods.botania.orechidignem;

// For ore ore object, you can use ioreDiCENTRY or write the ID of the mineral resignation in the string format

// Registering two formulas with the same weight at the same time will collapse the game!

// Add the format format of inflammatory ore orchid (using ioreDictical):

// Orechidignem.addore (ioreDictical Oredict, Int Weight);

// The following examples indicate that the Yanye orchid generates logs, and the weight is 500:

Orechidignem.addore (, 500);

// Add the format format of the inflammatory ore orchid (with string):

// ourechidignem.addore (String Oredict, int WEIGHT);

// The following examples indicate that the Yanye orchid generates logs, and the weight is 500:

Orechidignem.addore ("logwood", 500);

// Delete the format format of the inflammatory ore orchid (using ioreDiCENTRY):

// olchidignem.removeore (ioreDictical Oredict);

// The following examples indicate that the Yan Mine orchid is no longer reappeared into gold ore:

Orechidignem.removeore ();

// Delete the format format of the inflammatory ore orchid (with string):

// ourechidignem.removeore (string oredict);

// The following examples indicate that the Yan Mine orchid is no longer reappeared into gold ore:

Ionidignem.removeore ("olgold");

Flower Pharmaceutical Formula Modification

 Import Mods.botania.apothecary;

// You can use the returned IItemstack as the output parameter to add formula, or you can use the name of the plant flower as a string to add a formula

// String name is only applicable to Botania Flowers

// Note: Hua Yaotai is hard -coded and can only accept the petals of plant magic. Other items cannot be thrown into the Hua Yaotai

// Add the format format of the flower table:

// APOTHECARY.Addrecipe (IITEMSTACK OUTPUT, IINGREDIENT [] input);

// APOTHECARY.ADDRCIPE (String Output, IINGREDIENT [] input);

// The following example indicates the synthesis of watermelon with petals:

Apothecary.addRecipe (, [, , ]););););););););););););););););););); "];);"]; "];);););"];););); "];"];);); "];"];

// Delete the format format of the flower pills:

// Apothecary.removerecipe (IITEMSTACK OUTPUT); // Apothecary.removerecipe (String Output);

// The following examples indicate the formula of deleting the synthesis of solar flowers through the flower pharmacy:

Apothecary.removerecipe ("Daybloom");

Formula Formula Modification

 Import Mods.botania.puredaisy;

// Add the format format:

// puredaisy.addrecipe (IINGREDIENT BLOCKINPUT, IItemstack Blockoutput, @Optional Int time);

// Time is the time required to catalyze the catalytic block, the default is 150 ticks

// The following example indicates that white daisies consume 50 ticks to convert the soil into a grass square:

Poutaisy.addrecipe (, , 50);

// Delete the format format:

// puredaisy.removerecipe (IINGREDIENT OUTPUT);

// The following examples indicate that delete the formula to obtain obsidian through the transformation of white daisy:

Poutaisy.removerecipe ();

Rune altar formula modification

 Import Mods.botania.runealtar;

// Add Rune Altar Format Format:

// runealtar.addrecipe (IITEMSTACK OUTPUT, INGREDIENT [] input, int Mana);

// The following example indicates that through the rune altar, the wooden board and the grass are converted with 200 mANA into a wooden board:

RuneALTAR.ADDRECIPE (, [, ], 200;

// Delete the rune altar formula format:

// runealtar.removerecipe (IINGREDIENT OUTPUT);

// The following example indicates the formula that deletes the rune synthesis runes:

Runealtar.removerecipe ();