Endless Effect Items-Create a customized item Endless Effective Item (Avaritia It) Minecraft Game

Item add

1. Basic part

First create a xxx.zs file in the Scripts folder and open it with a text editor (it is recommended to use VS Code to open).

Type the following content

#loader avaritiatem

Import Mods.avaritiaitem.avaritiaitembuilder;

Import Mods.avaritiaitem.Itemprimer;

Avaritiatembuilder.registerItem ("data_card", 64, "data_card"). Create ();

Registeritem ("data_card", 64, "data_card") are respectively

Item registration name (must be fully written, and use the line to separate words);

The maximum single group number of items;

The Type name of the item model (must be unique in the global, the recommendation as the registration name is the same).

Next start the game, you will see such a item.

We need to add texture and names to the items.

Open the game folder ./minecraft/resources/avaritiaitem, you will see these three folders

The first thing that stores is the model file of the item, which generally does not need to be filled in manually;

The second one stores is a language file, you need to enter the creation of a zh_cn.lang file;

The third is the texture file of the item, and all the texture files must be placed in the items folder under this folder.

We add a name to the items that I just created, and we have set a texture. Here is an example of AE2 as an example.

The creation method of the name is to enter the following in zh_cn.lang created in the second folder.

 item.avaritiaitem.data_card.name = This is a tutorial item 

Item.avaritiaitem is fixed, and name is also fixed. The middle data_card is the registration name you set in the first step.

Then put the picture file called data_card.png in the items in the third folder.

Then start the game again, you can see that the materials and names of the items are successfully assigned.

2. Special effect adding

Back to our ZS script, began to add special effects to items.

 avaritiaitembuilder.registerItem ("data_card", 64, "data_card")

// The special effects added by the following methods can be freely matched. Which special effects need to be determined by yourself and which one does not need

.Shoulddrawhalo (true) // Whether to display a halo display

.Halosize (8) // Display halo is a must-filling size (1-16)

.Halocolour ("808080") // Select the halo color when the halo is selected as a hexadecimal color. If you set a halo picture, please do not call this method.

.HaloopaCity (100) // Halo transparency (0-100)

.halotextures ("Halo_image") // Select the halo custom picture when the halo is displayed. Just enter the name without suffering. The transparency needs to be modified by the picture editor. If this item is not setTo ./minecraft/resources/avaritiaitem/textures/items folder .shoulddrawcosmic (true) // Whether to render the background of the universe background

. Mask ("data_card_mask") // The picture must be filled in the background area of ​​the universe when True. The placement position is the same as the upper halo picture.You need to display the area with gray coverage (that is, the color of the RGB color disk in the color selector of the picture editor)

. MaskopAcity (1.0F) // Recommended value of the universe background transparency 1.0F

.Shoulddrawpulse (true) // Whether to display pulse special effects (that is, the jitter effect of endless catalyst)

.ColorFulname (True) // Whether to add colorful dynamic effects to the name of the item

.Addtooltip ("§A This is the first Tooltip") // Add item TOOLTIP

.Addtooltip ("This is the second Tooltip", TRUE) //

.Create ();

The pictures of the Halotextures and Mask attributes can only be used as dynamic according to the method of the original item material.

Halotextures has 3 preset values. This method does not require this method to default endless aura. Halo_noise is a noise halo, and Halo128 is a high -definition aura.

Due to the transparency of the overall aura rendered by code rendering, it is recommended to manually set the transparency on the picture.

The transparency of MASK is the transparency of the overall starry sky, with a minimum 0.1F, and the transparency is lower than 1.0F and will see the material of the original item in the background of the starry sky.

At this time, it is inside the Items folder.

End with flowers.