[CT-HELP] Extension and common problems of the synthetic editing function [CRT] CRAFTTWEAKER MINECRAFT Game

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

This tutorial is suitable for Crafttweaker, whether the API is compatible with it

The textbook comes from Bilibili's "Minecraft Module Introduction-CRAFTTWEAKER, MINETWEAKER, Modtweaker full introduction -12p" (av13038655) (AV13038655)

This article is original, and the previous QWQ made by the video of 943Dalao

Some example questions are from "http://www.mcbbs.net/thread-304800-1-1.html" of "http://www.mcbbs.net/thread

This tutorial is published by (salty cat) Chenwe_i_lin in the name of personal name to protect the article with the CC protocol, and the article is protected by the "signature (by) -non -commercial use (NC)" statement agreement, and allows others to conduct it to itConstructive modification

===========================================

When you want to add a magical synthesis:

recipes.addshapet ( * 4,

[, NULL, NULL],

[NULL, , NULL],

[Null, null, null]]);;

// Extra the wooden stick formula XD

Then you are in the game/mt RELOAD, confidently dragging a few wooden boards in the item bar ... why not use it!

Oh your question is this: A English ID in MC can refer to several items that you look different, the principle is the added value

Solution: Add ":*" after , that is, adding the format

recipes.addshapet ( * 4,

[, NULL, NULL],

[NULL, , NULL],

[Null, null, null]]);;

// Reinforced additional wooden stick formula XD

This is good, the problem is over here

============ The segmentation line ===============

You have added another problem in the integration package you called "heavy balance, heavy magic reform"

recipes.addshapet (,

[, , ],,],],

[NULL, , NULL],

[Null, null, null]]);;

// Another witty pick -up recipe Owo

When you hold a handful of you who have just switched to survival to test the excavation speed of the CS3 minerals, there are already losses.

Why can't I use WTF!

There is a magical mechanism in the MC: loss of value, he slows your industrial schedule and make your liver "full of sores" ... the amount is far away. In shortWoolen cloth?

In fact, as early as the MT era, MT gave you a solution, that is, adding a convenient thing after your items are marked, such as:::

.anydamage ()

This "AnyDamage" means "any loss of loss", so as long as you add this logo after the item is marked, you can implement the above -mentioned functions.

recipes.addshapet (,

[, , ],,],],

[Null, .anydamage (), null], null],

[Null, null, null]]);;

================ Another segmentation line ================

You want this:

"1 Wood to change 2 wooden boards, use stone ax to become 3 wooden boards, iron ax 4 wooden boards, gold ax 5 wooden boards, drilling ax 6 wooden board" "

But then you will be exhausted ... what should I do? CT provides a little -known function: the function of the cycle statement

It turned out to be like this:

recipes.addshapet (............, .................................., ................)

recipes.addshapet (.........)

recipes.addshapet (...........)

How about it, do you look hard to die? You can do this, Copy can do it, but then you will be tired ...

The intimate MT author gave such a magical feature, how can you not know?

This synthesis may require the support of "mineTweaker.item.iitemstack" expansion (important!)::

Import MineTweaker.Item.iitemstack;

Then we create an array variable that stores all wood:

varm mclogs = [, , , , , ] as IITEMSTACKK[];

The "as IItemstack [];" meaning is unknown

Create another array variable that stores all wooden boards:

var mcplanks = [, , , , , ] as IITEMSTACK [];

The two magical array variables are OJBK, it is recommended that you ctrl+s save

For convenience, add a few variables to represent the original ax:

var stoneaxe = .anydamage (). Transformdamage ();

var Ironaxe = .anydamage (). Transformdamage ();

var Goldenaxe = .anydamage (). Transformdamage ();

var diamondaxe = .anydamage (). Transformdamage ();

Here "transformdamage ()" means that the items are not consumed after synthesis and reduced their durability

Then there is the top priority of the section, that is, for loop: for i, log in mclogs {

// I refers to temporary variables, which refers to the number of times that the cycle has been performed. Do not use this as your variable name! Log means those wood, where the wood can be corresponding here! (provided that your array order is right, the order of the array is right,Yes, the order order sequence)

Var plank = mcplanks [i];

// This variable can be not used ... Next is ordinary deletion and modification

Recipes.removeShapeless (plank, [log]);

Recipes.addshapeless (Plank * 2, [log]);

Recipes.addshapeless (Plank * 3, [Log, Stoneaxe]);

Recipes.addshapeless (Plank * 4, [Log, Ironaxe]);

Recipes.addshapeless (Plank * 5, [Log, GOLDENAXE]);

Recipes.addshapeless (Plank * 6, [log, diamondaxe]);

}

// Important! The last symbol must be!

This small section is over.

This article is temporarily ended.