aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/mixins/MixinDoneLoading.java
blob: 0a3f3df17d669ad5f9ac92355700d3b694f759bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package me.shedaniel.mixins;

import me.shedaniel.Core;
import me.shedaniel.listenerdefinitions.DoneLoading;
import net.minecraft.init.Bootstrap;
import org.dimdev.riftloader.RiftLoader;
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;

/**
 * Created by James on 7/27/2018.
 */
@Mixin(Bootstrap.class)
public class MixinDoneLoading {
    
    @Inject(method = "register", at = @At("RETURN"))
    private static void onBootstrapRegister(CallbackInfo ci) {
        Core.LOGGER.info("REI: Done Loading");
        RiftLoader.instance.getListeners(DoneLoading.class).forEach(DoneLoading::onDoneLoading);
    }
    
}