summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
author alemidev <me@alemi.dev>2023-02-07 12:51:11 +0100
committer alemidev <me@alemi.dev>2023-02-07 12:51:11 +0100
commitce19836886060a7bb24f597b50e61028ffd4e2ab (patch)
tree439a739c7f8a3fe1900eaaf9278c2177bf34c1c8 /README.md
parent9f2777dedb1026da602d530c02bd7959a240e17e (diff)
docs: indent more example
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/README.md b/README.md
index 5a7c79f..2ca13eb 100644
--- a/README.md
+++ b/README.md
@@ -22,20 +22,20 @@ To load patches created with this library, a Launch Plugin loader is necessary (
### Example
```java
// file src/main/java/example/patches/SamplePatch.java
-package example.patches;
-import ftbsc.lll.IInjector;
-public class SamplePatch implements IInjector {
- public String name() { return "SamplePatch"; }
- public String targetClass() { return "net.minecraft.client.Minecraft"; }
- public String methodName() { return "func_71407_l"; } // tick()
- public String methodDesc() { return "()V"; }
- public void inject(ClassNode clazz, MethodNode main) {
- InsnList insnList = new InsnList();
- insnList.add(new InsnNode(POP));
- main.instructions.insert(insnList);
+ package example.patches;
+ import ftbsc.lll.IInjector;
+ public class SamplePatch implements IInjector {
+ public String name() { return "SamplePatch"; }
+ public String targetClass() { return "net.minecraft.client.Minecraft"; }
+ public String methodName() { return "func_71407_l"; } // tick()
+ public String methodDesc() { return "()V"; }
+ public void inject(ClassNode clazz, MethodNode main) {
+ InsnList insnList = new InsnList();
+ insnList.add(new InsnNode(POP));
+ main.instructions.insert(insnList);
+ }
}
-}
// file src/main/resources/META-INF/services/ftbsc.lll.IInjector
-example.patches.SamplePatch
+ example.patches.SamplePatch
```