Search in sources :

Example 1 with ServerPlayNetworkAddon

use of org.quiltmc.qsl.networking.impl.server.ServerPlayNetworkAddon in project quilt-standard-libraries by QuiltMC.

the class ServerPlayNetworkHandlerMixin method initAddon.

@Inject(method = "<init>", at = @At("RETURN"))
private void initAddon(CallbackInfo ci) {
    this.addon = new ServerPlayNetworkAddon((ServerPlayNetworkHandler) (Object) this, this.server);
    // A bit of a hack but it allows the field above to be set in case someone registers handlers during INIT event which refers to said field
    this.addon.lateInit();
}
Also used : ServerPlayNetworkHandler(net.minecraft.server.network.ServerPlayNetworkHandler) ServerPlayNetworkAddon(org.quiltmc.qsl.networking.impl.server.ServerPlayNetworkAddon) Inject(org.spongepowered.asm.mixin.injection.Inject)

Aggregations

ServerPlayNetworkHandler (net.minecraft.server.network.ServerPlayNetworkHandler)1 ServerPlayNetworkAddon (org.quiltmc.qsl.networking.impl.server.ServerPlayNetworkAddon)1 Inject (org.spongepowered.asm.mixin.injection.Inject)1