your current location:首页 > news>What are the things about the terminology Zengetter, ZenMethod and Zensetter

What are the things about the terminology Zengetter, ZenMethod and Zensetter

2024-12-10 17:50:28|Myriagame |source:minecraft skins

From CRTWIKI: https://docs.blamejared.com/1.12/zh/usionthiswiki

When I read CRTWIKI myself, I made a summary. The CRT tutorial of the friendship mother I saw before. Because I had a professional gap with the big guy, I did not understand it for a while, so I turned to the original Wiki.I got a lot of experience through reading and practice. Here I try to explain as popular as possible, hoping to give entry players help

Zengetter

for example

  .displayName; 

Among them, ".displayName" was the Zengetter

Specific Zengetter will correspond to a specific value and data type (the explanation of Wiki is: it is a method to retrieve information from a specific object.)

Just like DisplayName means "display name", the data type is string (string)

Print output through print, that is, iron ingots

Zengetter can be superimposed, that is, multiple suffixes, the type of the final value is related to the final suffix

Suppose I set up a player's synthetic event before, I hope that the player will print out what the player is synthetic as soon as he synthesizes.

 Import Crafttweaker.events.ieventmanager;

Import crafttweaker.event.playerCraFTEVENT; // Do not forget the guide package at any time

Events.onPlayerCraFTD (Function (Event Ass

Crafttweaker.event.playerCraFTEVENT) {{

Print (event.output.displayName); // Print the name of the name of the things synthesized by the player

Print (event.player.name); // Print and output players participating in synthesis

});

For example, I am now synthesizing a wool

First look at a series of Zengetter

The value corresponding to "Event.output" is ""

But print cannot output items, so it is necessary to convert it into a string

Then connect to the second Zengetter to become "Event.output.displayName", which translates the type of items into a string. The value obtained is "wool"

The value obtained by each zengetter will have a corresponding type

Look at the second "print (event.player.name);"; "

First use ".player" to obtain the "iPlayer" type, and then use ".Name" to obtain a string to output the ID of the player's ID of the event player

Zenmethod

That is the method, use synthetic sentences for an example

 recipes.addshaped (recipename, output, inputbox); 


Global keyword + zenmethod + (content);

Among them, "recipes" is a global keyword, which is used to call the synthet

".Addshaped" is ZenMethod, which is the method, that is, what to do

The same is true of the previous events

Zensetter

Used to change the value corresponding to Zengetter

For example


Then .displayName = xxx is Zensetter

GET means acquiring and obtained

SET has the meaning of settings and changes