File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed
Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change 1- ShotaASM
2- a script mod enables you write asm codes in scripts
1+ ### ShotaASM
2+ a script mod enables you write asm codes in scripts
3+
4+ #### example :
5+ ``` java
6+ #compiler javaShota
7+ #import org.apache.logging.log4j.LogManager
8+ #import org.apache.logging.log4j.Logger
9+
10+ System . out. print(" Shota Strat his own tests!!! ^o^" );
11+ final Logger LOGGER = LogManager . getLogger(" Cute shota" );
12+ LOGGER . info(" Now, i have my own logger!!" );
13+
14+ // Change the title
15+ TransformerRegistry . registerASMExplicitTransformer(- 99 ,
16+ (cn) - > {
17+ for (var mn : cn. methods) {
18+ var itr = mn. instructions. iterator();
19+ while (itr. hasNext()) {
20+ if (itr. next() instanceof LdcInsnNode ldc && ldc. cst instanceof String str && str. startsWith(" Cleanroom Loader" )) {
21+ ldc. cst = str + " & Cute Shota" ;
22+ LOGGER . info(" change the title to {}" , ldc. cst);
23+ }
24+ }
25+ }
26+ }, " net.minecraft.client.Minecraft" );
27+ ```
28+ ![ image] ( https://github.com/user-attachments/assets/e89ec1cc-7cea-483d-a204-3c6d545466e1 )
29+
30+
You can’t perform that action at this time.
0 commit comments