All Downloads are FREE. Search and download functionalities are using the official Maven repository.

personthecat.catlib.mixin.quilt.MainServerMixin Maven / Gradle / Ivy

package personthecat.catlib.mixin.quilt;

import com.mojang.datafixers.util.Pair;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
import net.minecraft.class_32;
import net.minecraft.class_3300;
import net.minecraft.class_3807;
import net.minecraft.class_5359;
import net.minecraft.server.Main;
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.CallbackInfoReturnable;
import personthecat.catlib.event.error.LibErrorContext;
import personthecat.catlib.event.lifecycle.GameReadyEvent;

@Mixin(Main.class)
public class MainServerMixin {

    // on forge: m_206537_
    @Inject(
        method = "method_40373",
        at = @At(value = "INVOKE",
        target = "Lnet/minecraft/core/RegistryAccess;builtinCopy()Lnet/minecraft/core/RegistryAccess$Writable;"))
    private static void modSetupComplete(
            class_32.class_5143 a, OptionSet o, OptionSpec s, class_3807 c,
            OptionSpec optionSpec2, class_3300 r, class_5359 d, CallbackInfoReturnable> cir) {
        LibErrorContext.outputServerErrors(true);
        GameReadyEvent.SERVER.invoker().run();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy