Update to Minecraft 1.20.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-06-13 07:00:00 +10:00
parent 746a0db582
commit f40eac90a3
5 changed files with 11 additions and 25 deletions

View File

@@ -1,14 +1,14 @@
--- a/net/minecraft/network/NetworkManager.java
+++ b/net/minecraft/network/NetworkManager.java
@@ -86,6 +86,7 @@
private float averageSentPackets;
private int tickCount;
@@ -88,6 +88,7 @@
private boolean handlingFault;
@Nullable
private volatile IChatBaseComponent delayedDisconnect;
+ public String hostname = ""; // CraftBukkit - add field
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
this.receiving = enumprotocoldirection;
@@ -167,7 +168,7 @@
@@ -173,7 +174,7 @@
}
private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener packetlistener) {
@@ -17,10 +17,10 @@
}
public void setListener(PacketListener packetlistener) {
@@ -296,7 +297,7 @@
@@ -306,7 +307,7 @@
}
public void disconnect(IChatBaseComponent ichatbasecomponent) {
if (this.channel.isOpen()) {
if (this.isConnected()) {
- this.channel.close().awaitUninterruptibly();
+ this.channel.close(); // We can't wait as this may be called from an event loop.
this.disconnectedReason = ichatbasecomponent;