1.12.2 Use CRT to add a description in Jei [Jei] Jei item manager (Just Enough items) Minecraft Game

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

After reading the tutorial in the station, I didn't find the tutorial that added the description in JEI. Let me write it here.

The final effect is:

After clicking items in Jei, the upper tab will have the word "i". Click on to see the custom description.

This tutorial defines the basic CRT usage of readers and a simple ZS language. If not, you can view the corresponding tutorial, and I will not repeat them here.

The relevant code is as follows:

 // grammar:

//mods.jei.jei.adddddescription (setem>, "string");

For example: I want diamonds to have a custom description, and the content is: this is a diamond.The implementation code is as follows:

 mods.jei.jei.addddescript (, "This is a diamond"); 

In addition, similar to

Enter the righteous symbols in it.

If there are too many items, you can simplify the code of this line. The effect is as follows:

 Import Mods.jei.jei;

Jei.adddescript (, "This is a diamond");

Jei.adddescription (, "This is an iron ingot");

If there are too many items and the description you want to add exactly the same, you can define the array and use for cycle to traverse. The code is as follows:

 Import Crafttweaker.Item.iitemstack; // array bag, can only use this package to use the array can be used by the array

Import Mods.jei.jei;

var Item as IItemstack [] = [

,

,

]; // Define an array of IITEMSTACK, including stones, soil, and grass squares.Enter each row is not necessary, here is the ease in order to read it for easy reading

For I in item {// Use for cycle through the array

Jei.adddescript (i, "These are the basic blocks of MC");