1.12.2 Use CRT to customize a tree TREE TWEAKER MINECRAFT Game

This tutorial is set by the author's setting without permission.

Before using this tutorial, I define readers with simple ZS scripts and simple ZS language writing. If not, please go to CRT to check the relevant tutorial.

Final effect (cover map):

First, guide package:

#loader preinit

Import Mods.treetweaker.Treefactory;

Next, define a tree called BX, and the string is named Tree.BX is the abbreviation of my name, it turns out that I am a tree

 var bx = treefactory.createtree ("time"); 

Then use the BX. Command; the form to complete this tree, which contains the commands (here is commonly used, please move to wiki):

 Settreetype ("oak") // where OAK is the type of the tree and can be understood as a template.There are Oak, LARGE_OAK, JUNGLE, Canopy, Large_canopy, Pine, LARGE_PINE, SPRUCE, LARE , Willow

setlog ("Minecraft: Diamond_block") // Set the trunk of the tree, for example, diamonds

SETLEAF ("Minecraft: Obsidian") // Set the leaves of the tree, the example is obsidian

setminheigh (5) // minimum height

Setextraheight (3) // Extraceled height

Setgenfrequency (5) // generate frequency, the higher the more trees

SetGenatTempts (1) // generates the number of attempts, the same as above

setgenbiome ("Minecraft: Plains") // Restriction of the generation of biological groups, example: only plain generation

Setgenbiomebytag ("HOT") // Limit the generating biological group tag generation, for example: HOT (desert, tropical grassland, evil place) Setdimwhitelist (7) // Limit dimension whiter list, example 7 (twilight forest), please use multiple dimensions, please use[1, -1,0] Similar array

The ends of the above code need to be used in English.

After completion, use this line code to end:

 bx.register (); 

Then, if you reload the game, you will find that the new block has the tree you defined.

Complete code example:

The tree code on the cover (trunk is the author's integration package self -defined item)

#loader preinit

Import Mods.treetweaker.Treefactory;

var xuanjing = treefactory.createtree ("xuanjing");

xuanjing.settreetype ("oak");

xuanjing.setlog ("additions: bxloveu-bx_goldore");

xuanjing.setleaf ("Minecraft: Melon_block");

xuanjing.setminheight (3);

xuanjing.Setextraheight (5);

xuanjing.setgenfrequency (6);

xuanjing.setdimwhitelist (7);

xuanjing.register ();