Skip to content

Commit be562a6

Browse files
authored
cleanroom changed the title, so we adapt it
1 parent 776984a commit be562a6

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,27 @@ TransformerRegistry.registerASMExplicitTransformer(-99 ,
2323
for (var mn :cn.methods) {
2424
var itr = mn.instructions.iterator();
2525
while (itr.hasNext()) {
26-
if (itr.next() instanceof LdcInsnNode ldc && ldc.cst instanceof String str && str.startsWith("Cleanroom Loader")) {
26+
if (itr.next() instanceof LdcInsnNode ldc && ldc.cst instanceof String str && str.startsWith("Cleanroom")) {
2727
ldc.cst = str + " & Cute Shota";
2828
LOGGER.info("change the title to {}", ldc.cst);
2929
}
3030
}
3131
}
3232
}, "net.minecraft.client.Minecraft");
33+
34+
// Arrors is infinite
35+
TransformerRegistry.registerASMExplicitTransformer(-99 ,
36+
(cn) -> {
37+
for (var mn :cn.methods) {
38+
if ("isInfinite".equals(mn.name)){
39+
mn.instructions.clear();
40+
mn.visitInsn(Opcodes.ICONST_1);
41+
mn.visitInsn(Opcodes.IRETURN);
42+
var itr = mn.instructions.iterator();
43+
}
44+
}
45+
}, "net.minecraft.item.ItemArrow");
46+
3347
```
3448

3549
![image](https://github.com/user-attachments/assets/e89ec1cc-7cea-483d-a204-3c6d545466e1)

0 commit comments

Comments
 (0)