Compare commits

..

No commits in common. '574ca7dbe44c4d1a9b554e52b1604449e76643be' and 'b8af07aa4ec6a33e324aad6e855b09e309b65b2d' have entirely different histories.

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

@ -49,13 +49,6 @@ object E4mcClient : ModInitializer {
dispatcher.register(literal("e4mc")
.then(
literal("stop")
.requires { src ->
if (src.server.isDedicated) {
src.hasPermissionLevel(4)
} else {
src.server.isHost((src.player ?: return@requires false).gameProfile)
}
}
.executes { context ->
if (HANDLER != null) {
HANDLER!!.close()

Loading…
Cancel
Save