your current location:首页 > news>KJS6#Advanced instance #Curios instance and Ambiguous ambient method processing [KJS] Kubejs Minecraft Game

KJS6#Advanced instance #Curios instance and Ambiguous ambient method processing [KJS] Kubejs Minecraft Game

2024-12-10 17:58:23|Myriagame |source:minecraft skins

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

The example version is forge 1.19.2, and other versions can be referred to self -reform.

Complete instance

When the player right -click the powerful magnet's 'Artifacts: Universal_attractor' and the jewelry bar there is a powerful magnet, the surrounding drops are gathered in their own position ...

*The following 'field' refers to the necklace necklace, ring right ', etc.,' slot position 'refers to the slot

Related methods in the instance: obtain the count wearing specific items; set items for specific slots of a specific field; obtain the items in the N slice of the specific field (n is the index, starting from 0, 0 represents the first bit of the first place.); Get the total number of grooves owned by the player; obtain all items in the jewelry bar;

Some brief description

Internet.icurioshelper.findcurios

This method is divided into 3 types, of which 1 and 2 of ARG1 (that is, parameters 2) are all items. ARG1 in the method 3 is to fill in String [] []

The usual approach is to write it directly, as in Figure 1 below, but in actual runtime, you will find a triggering report (below 2): Java Method ... is ambiguous, which can be understood as the parameter ofThe format of ambiguity, at this time, you need to manually specify the parameter type. The specific method is written in line 360/361/362 in Figure 1 below. In short, it isIn the prompt, one of the desire is copied as a string into [], and the ambiguity processing is completed at this time.

*Note: The type of this approach will become any after the processing is processed. It needs to be manually marked (such as line 358), which is convenient for subsequent code complement.

Internet.ItemcoolDowns.isoncooldown (Arg0: Internet.item_)

In the example, 353 lines are useful, whether the detection items are in cooling, but the original version has loopholes, and the cooling of the player will be reset when the cooling is re -entered.


Outside words: Even if the accessories with attribute bonus are set in unreasonable fields (such as hand -made necklace slots), the attribute will still take effect

There are other methods in Curiosapi, which can be studied by yourself.

If you feel too complicated or difficult to control, you may use the command provided by the module itself/Curios itself