From 0fe5e487922a6ff50b9c415b9384157fbd64b2b5 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 1 Apr 2024 17:48:53 +0200 Subject: Initial commit --- src/main/java/moe/nea/potatocrime/mixin/ExampleMixin.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/main/java/moe/nea/potatocrime/mixin/ExampleMixin.java (limited to 'src/main/java/moe/nea') 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 -- cgit