mirror of
https://github.com/PaperMC/Folia.git
synced 2025-01-09 19:47:41 +01:00
76b06a1260
The code to stop all brain tasks is required to pass the current game time to the tasks it stops. But, when a villager is being portalled, the copied entity does not have any running tasks. So, we can simply return early before invoking getGameTime if there are no running tasks. Fixes https://github.com/PaperMC/Folia/issues/23
20 lines
1.2 KiB
Diff
20 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
|
Date: Wed, 29 Mar 2023 10:15:40 -0700
|
|
Subject: [PATCH] Work around https://github.com/PaperMC/paperweight/issues/194
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
index 0243b6cd61c96656e61fce7d9f85fbf859c2f04d..776ecde97e10d5c6e0323960f2bd297684387735 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -494,7 +494,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
|
this.disconnect(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(s), cause);
|
|
}
|
|
|
|
- @io.papermc.paper.annotation.DoNotUse // Paper
|
|
+ @Deprecated(forRemoval = true) // Folia - https://github.com/PaperMC/paperweight/issues/194
|
|
public void disconnect(final Component reason) {
|
|
this.disconnect(PaperAdventure.asAdventure(reason), org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN);
|
|
}
|