2021-03-16 09:00:00 +11:00
|
|
|
--- a/net/minecraft/network/NetworkManager.java
|
|
|
|
+++ b/net/minecraft/network/NetworkManager.java
|
2024-04-24 01:15:00 +10:00
|
|
|
@@ -114,6 +114,7 @@
|
2024-06-14 01:05:00 +10:00
|
|
|
private volatile DisconnectionDetails delayedDisconnect;
|
2023-09-22 02:40:00 +10:00
|
|
|
@Nullable
|
|
|
|
BandwidthDebugMonitor bandwidthDebugMonitor;
|
2022-10-28 20:19:11 +11:00
|
|
|
+ public String hostname = ""; // CraftBukkit - add field
|
|
|
|
|
|
|
|
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
|
|
|
this.receiving = enumprotocoldirection;
|
2024-06-14 01:05:00 +10:00
|
|
|
@@ -205,7 +206,7 @@
|
2018-07-15 10:00:00 +10:00
|
|
|
}
|
|
|
|
|
2021-11-22 09:00:00 +11: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 10:00:00 +10:00
|
|
|
}
|
|
|
|
|
2024-04-24 01:15:00 +10:00
|
|
|
private void validateListener(ProtocolInfo<?> protocolinfo, PacketListener packetlistener) {
|
2024-06-14 01:05:00 +10:00
|
|
|
@@ -469,7 +470,7 @@
|
2023-06-13 07:00:00 +10:00
|
|
|
}
|
2014-11-26 08:32:16 +11:00
|
|
|
|
2023-06-13 07:00:00 +10:00
|
|
|
if (this.isConnected()) {
|
2015-05-05 21:43:47 +01:00
|
|
|
- this.channel.close().awaitUninterruptibly();
|
|
|
|
+ this.channel.close(); // We can't wait as this may be called from an event loop.
|
2024-06-14 01:05:00 +10:00
|
|
|
this.disconnectionDetails = disconnectiondetails;
|
2015-02-26 22:41:06 +00:00
|
|
|
}
|
|
|
|
|
2024-06-14 01:05:00 +10:00
|
|
|
@@ -537,7 +538,7 @@
|
2024-04-24 01:15:00 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|