aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/potatocrime/mixin/ExampleMixin.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/moe/nea/potatocrime/mixin/ExampleMixin.java')
-rw-r--r--src/main/java/moe/nea/potatocrime/mixin/ExampleMixin.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/moe/nea/potatocrime/mixin/ExampleMixin.java b/src/main/java/moe/nea/potatocrime/mixin/ExampleMixin.java
new file mode 100644
index 0000000..79e4299
--- /dev/null
+++ b/src/main/java/moe/nea/potatocrime/mixin/ExampleMixin.java
@@ -0,0 +1,15 @@
+package moe.nea.potatocrime.mixin;
+
+import net.minecraft.server.MinecraftServer;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(MinecraftServer.class)
+public class ExampleMixin {
+ @Inject(at = @At("HEAD"), method = "loadWorld")
+ private void init(CallbackInfo info) {
+ // This code is injected into the start of MinecraftServer.loadWorld()V
+ }
+} \ No newline at end of file