This commit is contained in:
Sotr
2018-05-29 22:17:50 +08:00
parent a7c6e37dc6
commit 6f98d609a9
2 changed files with 0 additions and 32 deletions

View File

@@ -1,31 +0,0 @@
package io.akarin.server.mixin.core;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import io.netty.channel.Channel;
import net.minecraft.server.ITickable;
import net.minecraft.server.NetworkManager;
import net.minecraft.server.PacketListener;
@Mixin(value = NetworkManager.class, remap = false)
public class MixinNetworkManager {
@Shadow private boolean m() { return false; }
@Shadow private PacketListener m;
@Shadow public Channel channel;
@Shadow private static boolean enableExplicitFlush;
@Overwrite
public void a() {
this.m();
if (this.m instanceof ITickable) {
((ITickable) this.m).e();
}
if (this.channel != null) {
if (enableExplicitFlush) this.channel.eventLoop().execute(() -> this.channel.flush()); // Paper - we don't need to explicit flush here, but allow opt in incase issues are found to a better version
}
}
}

View File

@@ -14,7 +14,6 @@
"MixinMetrics",
"MixinPaperConfig",
"MixinCraftServer",
"MixinNetworkManager",
"MixinVersionCommand",
"MixinMinecraftServer"
]