geforkt von Mirrors/Paper
SPIGOT-7587: Remove fixes for now-resolved MC-142590 and MC-109346
By: Doc <nachito94@msn.com>
Dieser Commit ist enthalten in:
Ursprung
39994359d1
Commit
064818a555
@ -16,18 +16,7 @@
|
||||
public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T t0, IAsyncTaskHandler<?> iasynctaskhandler) throws CancelledPacketHandleException {
|
||||
if (!iasynctaskhandler.isSameThread()) {
|
||||
iasynctaskhandler.executeIfPossible(() -> {
|
||||
+ if (MinecraftServer.getServer().hasStopped() || (t0 instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) t0).processedDisconnect)) return; // CraftBukkit, MC-142590
|
||||
+ if (t0 instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
|
||||
if (t0.shouldHandleMessage(packet)) {
|
||||
try {
|
||||
packet.handle(t0);
|
||||
@@ -60,6 +66,10 @@
|
||||
|
||||
});
|
||||
throw CancelledPacketHandleException.RUNNING_ON_DIFFERENT_THREAD;
|
||||
+ // CraftBukkit start - SPIGOT-5477, MC-142590
|
||||
+ } else if (MinecraftServer.getServer().hasStopped() || (t0 instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) t0).processedDisconnect)) {
|
||||
+ throw CancelledPacketHandleException.RUNNING_ON_DIFFERENT_THREAD;
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -731,16 +731,11 @@
|
||||
|
||||
try {
|
||||
arraylist = Lists.newArrayList(NativeModuleLister.listModules());
|
||||
@@ -1903,6 +2239,22 @@
|
||||
@@ -1903,6 +2239,17 @@
|
||||
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ @Override
|
||||
+ public boolean isSameThread() {
|
||||
+ return super.isSameThread() || this.isStopped(); // CraftBukkit - MC-142590
|
||||
+ }
|
||||
+
|
||||
+ public boolean isDebugging() {
|
||||
+ return false;
|
||||
+ }
|
||||
@ -754,7 +749,7 @@
|
||||
private void startMetricsRecordingTick() {
|
||||
if (this.willStartRecordingMetrics) {
|
||||
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(SystemUtils.timeSource, this.isDedicatedServer()), SystemUtils.timeSource, SystemUtils.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
|
||||
@@ -2029,6 +2381,11 @@
|
||||
@@ -2029,6 +2376,11 @@
|
||||
|
||||
}
|
||||
|
||||
|
@ -113,22 +113,15 @@
|
||||
if (!collection.isEmpty()) {
|
||||
consumer.accept(new PacketPlayOutUpdateAttributes(this.entity.getId(), collection));
|
||||
}
|
||||
@@ -303,7 +342,14 @@
|
||||
@@ -303,6 +342,7 @@
|
||||
if (!list.isEmpty()) {
|
||||
consumer.accept(new PacketPlayOutEntityEquipment(this.entity.getId(), list));
|
||||
}
|
||||
+ ((EntityLiving) this.entity).detectEquipmentUpdatesPublic(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
|
||||
+ }
|
||||
+
|
||||
+ // CraftBukkit start - MC-109346: Fix for nonsensical head yaw
|
||||
+ if (this.entity instanceof EntityPlayer) {
|
||||
+ consumer.accept(new PacketPlayOutEntityHeadRotation(this.entity, (byte) MathHelper.floor(this.entity.getYHeadRot() * 256.0F / 360.0F)));
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
|
||||
if (!this.entity.getPassengers().isEmpty()) {
|
||||
consumer.accept(new PacketPlayOutMount(this.entity));
|
||||
@@ -338,6 +384,11 @@
|
||||
@@ -338,6 +378,11 @@
|
||||
Set<AttributeModifiable> set = ((EntityLiving) this.entity).getAttributes().getDirtyAttributes();
|
||||
|
||||
if (!set.isEmpty()) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren