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

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

Go to download

Utilities for serialization, commands, noise generation, IO, and some new data types.

The newest version!
package personthecat.catlib.mixin.quilt;

import net.minecraft.class_5455;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import personthecat.catlib.event.registry.RegistryAccessEvent;

// Must run before Fabric mixin
@Mixin(value = MinecraftServer.class, priority = 10_000)
public abstract class MinecraftServerMixin {

    @Shadow
    public abstract class_5455.class_6890 registryAccess();

    @Inject(method = "", at = @At("RETURN"))
    private void postInit(final CallbackInfo ci) {
        RegistryAccessEvent.EVENT.invoker().accept(this.registryAccess());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy