aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-12-17 23:07:06 +0100
committerLinnea Gräf <nea@nea.moe>2024-12-17 23:07:06 +0100
commita046b198645811fe1b7db129942505c379aabb03 (patch)
treed97e68b1cf3a272aec5d8dd863b82fb0c9b0dc82 /src/main/java/moe
parenta2f73de90fb9c9d0ea7a5e7e9e6b9e445a8094ee (diff)
downloadLocalTransactionLedger-a046b198645811fe1b7db129942505c379aabb03.tar.gz
LocalTransactionLedger-a046b198645811fe1b7db129942505c379aabb03.tar.bz2
LocalTransactionLedger-a046b198645811fe1b7db129942505c379aabb03.zip
feat: Add name prefetching
Diffstat (limited to 'src/main/java/moe')
-rw-r--r--src/main/java/moe/nea/ledger/mixin/OnInitializationCompletePatch.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/moe/nea/ledger/mixin/OnInitializationCompletePatch.java b/src/main/java/moe/nea/ledger/mixin/OnInitializationCompletePatch.java
new file mode 100644
index 0000000..fc9afb7
--- /dev/null
+++ b/src/main/java/moe/nea/ledger/mixin/OnInitializationCompletePatch.java
@@ -0,0 +1,18 @@
+package moe.nea.ledger.mixin;
+
+import moe.nea.ledger.events.InitializationComplete;
+import net.minecraft.client.Minecraft;
+import net.minecraftforge.common.MinecraftForge;
+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(Minecraft.class)
+public class OnInitializationCompletePatch {
+
+ @Inject(method = "startGame", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/client/FMLClientHandler;onInitializationComplete()V"))
+ private void onInitComplete(CallbackInfo ci) {
+ MinecraftForge.EVENT_BUS.post(new InitializationComplete());
+ }
+}