personthecat.catlib.mixin.quilt.MinecraftServerMixin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of catlib-quilt Show documentation
Show all versions of catlib-quilt Show documentation
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());
}
}