Skip to content

Commit 93a6d8b

Browse files
authored
Update README.md
1 parent 0de98d0 commit 93a6d8b

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
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+

0 commit comments

Comments
 (0)