@@ -0,0 +1,21 @@
|
||||
--- a/net/minecraft/server/PlayerConnectionUtils.java
|
||||
+++ b/net/minecraft/server/PlayerConnectionUtils.java
|
||||
@@ -14,6 +14,7 @@
|
||||
public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T t0, IAsyncTaskHandler<?> iasynctaskhandler) throws CancelledPacketHandleException {
|
||||
if (!iasynctaskhandler.isMainThread()) {
|
||||
iasynctaskhandler.execute(() -> {
|
||||
+ if (MinecraftServer.getServer().hasStopped() || (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect)) return; // CraftBukkit, MC-142590
|
||||
if (t0.a().isConnected()) {
|
||||
packet.a(t0);
|
||||
} else {
|
||||
@@ -22,6 +23,10 @@
|
||||
|
||||
});
|
||||
throw CancelledPacketHandleException.INSTANCE;
|
||||
+ // CraftBukkit start - SPIGOT-5477, MC-142590
|
||||
+ } else if (MinecraftServer.getServer().hasStopped() || (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect)) {
|
||||
+ throw CancelledPacketHandleException.INSTANCE;
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/server/PacketPlayInCloseWindow.java
|
||||
+++ b/net/minecraft/server/PacketPlayInCloseWindow.java
|
||||
@@ -8,6 +8,12 @@
|
||||
|
||||
public PacketPlayInCloseWindow() {}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ public PacketPlayInCloseWindow(int id) {
|
||||
+ this.id = id;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public void a(PacketListenerPlayIn packetlistenerplayin) {
|
||||
packetlistenerplayin.a(this);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/PacketPlayOutMultiBlockChange.java
|
||||
+++ b/net/minecraft/server/PacketPlayOutMultiBlockChange.java
|
||||
@@ -24,7 +24,7 @@
|
||||
short short0 = (Short) shortiterator.next();
|
||||
|
||||
this.b[i] = short0;
|
||||
- this.c[i] = chunksection.getType(SectionPosition.a(short0), SectionPosition.b(short0), SectionPosition.c(short0));
|
||||
+ this.c[i] = (chunksection != null) ? chunksection.getType(SectionPosition.a(short0), SectionPosition.b(short0), SectionPosition.c(short0)) : Blocks.AIR.getBlockData(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/server/PacketPlayOutWorldBorder.java
|
||||
+++ b/net/minecraft/server/PacketPlayOutWorldBorder.java
|
||||
@@ -18,8 +18,10 @@
|
||||
|
||||
public PacketPlayOutWorldBorder(WorldBorder worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction packetplayoutworldborder_enumworldborderaction) {
|
||||
this.a = packetplayoutworldborder_enumworldborderaction;
|
||||
- this.c = worldborder.getCenterX();
|
||||
- this.d = worldborder.getCenterZ();
|
||||
+ // CraftBukkit start - multiply out nether border
|
||||
+ this.c = worldborder.getCenterX() * worldborder.world.getDimensionManager().getCoordinateScale();
|
||||
+ this.d = worldborder.getCenterZ() * worldborder.world.getDimensionManager().getCoordinateScale();
|
||||
+ // CraftBukkit end
|
||||
this.f = worldborder.getSize();
|
||||
this.e = worldborder.k();
|
||||
this.g = worldborder.j();
|
||||
Reference in New Issue
Block a user