|
|
@ -11,6 +11,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
|
|
|
import org.spongepowered.asm.mixin.Shadow;
|
|
|
|
import org.spongepowered.asm.mixin.Shadow;
|
|
|
|
import org.spongepowered.asm.mixin.injection.At;
|
|
|
|
import org.spongepowered.asm.mixin.injection.At;
|
|
|
|
import org.spongepowered.asm.mixin.injection.Inject;
|
|
|
|
import org.spongepowered.asm.mixin.injection.Inject;
|
|
|
|
|
|
|
|
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
|
|
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
|
|
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
|
|
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
|
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
|
|
import vg.skye.e4mc_minecraft.E4mcClient;
|
|
|
|
import vg.skye.e4mc_minecraft.E4mcClient;
|
|
|
@ -45,9 +46,9 @@ public abstract class ServerNetworkIoMixin {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Redirect(method = "bind", at = @At(value = "INVOKE", target = "Lio/netty/bootstrap/ServerBootstrap;channel(Ljava/lang/Class;)Lio/netty/bootstrap/AbstractBootstrap;", remap = false))
|
|
|
|
@ModifyArg(method = "bind", at = @At(value = "INVOKE", target = "Lio/netty/bootstrap/ServerBootstrap;channel(Ljava/lang/Class;)Lio/netty/bootstrap/AbstractBootstrap;", remap = false))
|
|
|
|
private AbstractBootstrap<ServerBootstrap, ServerChannel> redirectChannel(ServerBootstrap instance, Class<? extends ServerSocketChannel> aClass) {
|
|
|
|
private Class<? extends ServerChannel> redirectChannel(Class<? extends ServerChannel> aClass) {
|
|
|
|
return initializingE4mc.get() ? instance.channel(LocalServerChannel.class) : instance.channel(aClass);
|
|
|
|
return initializingE4mc.get() ? LocalServerChannel.class : aClass;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Redirect(method = "bind", at = @At(value = "INVOKE", target = "Lio/netty/bootstrap/ServerBootstrap;localAddress(Ljava/net/InetAddress;I)Lio/netty/bootstrap/AbstractBootstrap;", remap = false))
|
|
|
|
@Redirect(method = "bind", at = @At(value = "INVOKE", target = "Lio/netty/bootstrap/ServerBootstrap;localAddress(Ljava/net/InetAddress;I)Lio/netty/bootstrap/AbstractBootstrap;", remap = false))
|
|
|
|