your current location:首页 > news>Reflection Command (Reflection Command) Minecraft

Reflection Command (Reflection Command) Minecraft

2024-12-15 01:47:12|Myriagame |source:minecraft skins

This module is for entertainment only


Version 1.16.5

Added commands that can be reflected in Java:/Reflect

/Reflect has 9 sub -commands: Assign, LITERAL, Print, Field, Get, Method, Invoke, Runcommand, Clearvars

/Reflect assign

Assignment: assign the value of the source to target. If target is "_all", the value of the source to all variables

Example:/Reflect assign myvar _temp, this instruction gives the value of _temp to myvar -equivalent to code myvar = _temp;

/Reflect Literal

Literary quantity: According to the type of parsing of the type of the type, and store the resolution results to the variable_Temp. Among them, the type of Long, Float, Double types does not have L, F, and D. CHAR is considered a non -symbolic integer type.

Example:/Reflect Literal CHAR 48, this instruction uses 48 as a non -symbolic integer char, the result is 48, that is, the character '0'

/Reflect Print

Print: Print variable VAR to the chat bar or command block feedback bar

Example:/Reflect Print

/Reflect Field

Field: Get the Field field of the Class class (a java.lang.reflet.field object, not the value of this field), and store it to _temp variables

Example:/Reflect Field Java.lang.character Max_value. This instruction obtained the max_value field of java.lang.character as a java.lang.reflect.field object as a java.lang.reflect.field. = java.lang.chaarat.class.getField ("max_value");

/Reflect get

Obtain: Get the value of the variable subject in the value of the variable_temp field and store it to the variable _TEMP.This requires variables_temp must be a java.lang.reflet.filed object.If it is accessing the static field, the subject fills NULL

Example:/Reflect get null, assuming the field obtained by the currently _temp value is the above example, then the instruction is obtained by NULL as the main body (because it is a static field).'), As an object of java.lang.character, stored to the variable_Temp -equivalent to code

/Reflet Method [Paras]

Methods: The parameter list of the class class to get the Class class is a method or constructor of the Paras (is a java.lang.reflet.method or java.lang.reflect.constructor object, not calling this method or constructor).If Method fills New or , get the constructor, otherwise the method is obtained.Paras fill in the class name of each parameter, separate between a single space.If there are no parameters, do not fill in PARAS

Example:/Reflect Method Java.lang.String Substring int, this instruction obtained the substring (int, int) method of java.lang.string as a java.lang.reflet.Method object as a java.lang.reflet.Method object.It is equivalent to code_temp = java.lang.string.class.getMethod ("substring", int.class, int.class);/Reflect Invoke [PARAS]

Call: Use the variable subject as the main body to store the method or constructor stored in the variable _temp, pass the variable parad parameter, and store the return value to _Temp.This requires that _temp must be a java.lang.reflet.Method or java.lang.reflet.constructor object.If the static method or constructor is called, the subject fills NULL.Paras fill in the variable name of each parameter, and separate with a single space between them.If there are no parameters, do not fill in Paras.

Example:/Reflect Invoke Str Start End, assuming that the current STR is a string, the start and end are the method of the testStart and end, and store the return value to the variable_Temp -equivalent to code _temp = ((med) _temp) .invoke (str, start, end);

/Reflect Runcommand

Run instruction: Call the Objects.tring method to the variable Command and use the returned string as the command execution.Execute parameters (executors, positions, angles, dimensions, etc.) are the same as the execution of the command.

Example:/Reflect Runcommand Str, assuming that the current STR is "TP ~ 1 ~", the executor will be transmitted to the top of it -equivalent to instructions/TP ~ ~ 1 ~;

/Reflect Clearvars

Clear variables: clear all variables

1.19.2-0.1.0.0

Instruction tree:

-` RELFECT`

-` Literal`

Analyze a literal amount and press into the stack

-` Byte | Short | int | Long +| - 2 | 8 | 10 | 16 `

`+| -` indicates that there are symbols | unsigned,` 2 | 8 | 10 | 16` indicate binary | octagonal | decimal | Sixteen-proof

-` CHAR `

Support the transfer character;

-` Boolean True | False`

-` Float | Double `

Support ordinary decimal (such as 1024.0), scientific counting method (such as 1.024E3), hexadecimal science counting method (such as 0x2p10)

-` String ``

Without dual quotation

-` Class `

Get the `class` object, the class name is full -limited class name.

-` store `

Popping out the top object of the stack and stored in the global variable table

-` LOAD `

Get object from the global variable table and press it into the stack

-` POP`

Pop -up top object

-` NEW `

Call the constructor and pop up the stack object with the same number of constructor parameters as a parameter, and the object created by the constructor is pressed into the stack.

`Constructor name` Format: `Full-limited class name+parameter full-limited class name 1-parameter full-limited class name 2-` `, such as` java.util.arraylist+int`, `java.lang.runtimeexception+java. Lang.string-java.lang.throwable`

-` Invoke `

The call method, if it is not a static method, pops up the top object of the stack as the call object, pops up the stack top object with the same number of method parameters as a parameter, and the return value is pressed into the stack.

`Method name` Format: `Full-limited class name+method name+parameter full-limited class name 1-parameter full-limited class name 2-` `, such as` java.util.list+get`, `java.langg.String+substring+int-int`

-` Getfield ``

Get the value of the field.If it is not a static field, the top object of the stack is popped up as the access object, and the obtained value is put into the stack.

`Field name` Format: `Full -limited class name+field name`, such as `java.lang.integer+max_value`

-` putfield `

Set the value of the field.If it is not a static field, the top object of the stack is popped up as the access object, and then the top object of the stack is popped up, and the value of the field is set to the object.

-` astore`

Save the object into the array.Three objects popped up from the stack, the first as an index, the second as an array, and the third as the object of the deposit array.

-` aload`

Object object from an array.Two objects popped up from the stack, the first as an index, the second as an array, the obtained value was put into the stack.

-`stack`

Press the whole border stack into the stack.

-` VARS`

Press the global variable table into the stack.

Minecraft images

G Copyright Mc Encyclopedia 2013-2024 mcmod.cn | Hubei ICP No. 11010313 -2

Minecraft images

In addition to other statements, MCMOD.CN, all open public editing content uses the BY-NC-SA 3.0 protocol.

Minecraft images