2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/network/NetworkManager.java
|
|
|
|
+++ b/net/minecraft/network/NetworkManager.java
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -114,6 +114,7 @@
|
2023-06-12 23:00:00 +02:00
|
|
|
private volatile IChatBaseComponent delayedDisconnect;
|
2023-09-21 18:40:00 +02:00
|
|
|
@Nullable
|
|
|
|
BandwidthDebugMonitor bandwidthDebugMonitor;
|
2022-10-28 11:19:11 +02:00
|
|
|
+ public String hostname = ""; // CraftBukkit - add field
|
|
|
|
|
|
|
|
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
|
|
|
this.receiving = enumprotocoldirection;
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -197,7 +198,7 @@
|
2018-07-15 02:00:00 +02:00
|
|
|
}
|
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener packetlistener) {
|
|
|
|
- packet.handle(packetlistener);
|
|
|
|
+ packet.handle((T) packetlistener); // CraftBukkit - decompile error
|
2018-07-15 02:00:00 +02:00
|
|
|
}
|
|
|
|
|
2024-04-23 17:15:00 +02:00
|
|
|
private void validateListener(ProtocolInfo<?> protocolinfo, PacketListener packetlistener) {
|
|
|
|
@@ -457,7 +458,7 @@
|
2023-06-12 23:00:00 +02:00
|
|
|
}
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2023-06-12 23:00:00 +02:00
|
|
|
if (this.isConnected()) {
|
2015-05-05 22:43:47 +02:00
|
|
|
- this.channel.close().awaitUninterruptibly();
|
|
|
|
+ this.channel.close(); // We can't wait as this may be called from an event loop.
|
2021-06-11 07:00:00 +02:00
|
|
|
this.disconnectedReason = ichatbasecomponent;
|
2015-02-26 23:41:06 +01:00
|
|
|
}
|
|
|
|
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -525,7 +526,7 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
public void configurePacketHandler(ChannelPipeline channelpipeline) {
|
|
|
|
- channelpipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter(this) {
|
|
|
|
+ channelpipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter() { // CraftBukkit - decompile error
|
|
|
|
public void write(ChannelHandlerContext channelhandlercontext, Object object, ChannelPromise channelpromise) throws Exception {
|
|
|
|
super.write(channelhandlercontext, object, channelpromise);
|
|
|
|
}
|