Do not use worldgen executor for api profile completions
We cannot put blocking network I/O onto the worldgen threads, this will crash the server if it stalls
This commit is contained in:
parent
ed79fc947a
commit
41647af74c
590 changed files with 175 additions and 162 deletions
25
patches/server/0567-Fix-villager-boat-exploit.patch
Normal file
25
patches/server/0567-Fix-villager-boat-exploit.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Mon, 11 Jan 2021 12:43:51 -0800
|
||||
Subject: [PATCH] Fix villager boat exploit
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 75c713f7afd8c4fd5fffada7397b102751eb6423..6c7105af36339514db02800e651cd0948d48bdaf 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -625,6 +625,14 @@ public abstract class PlayerList {
|
||||
PlayerList.LOGGER.debug("Removing player mount");
|
||||
entityplayer.stopRiding();
|
||||
entity.getPassengersAndSelf().forEach((entity1) -> {
|
||||
+ // Paper start
|
||||
+ if (entity1 instanceof net.minecraft.world.entity.npc.AbstractVillager villager) {
|
||||
+ final net.minecraft.world.entity.player.Player human = villager.getTradingPlayer();
|
||||
+ if (human != null) {
|
||||
+ villager.setTradingPlayer(null);
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
entity1.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue