aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/ledger/mixin/OnInitializationCompletePatch.java
blob: fc9afb7ef07e0d2a4b5bb79f7d68491104562792 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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());
	}
}