2021-06-14 19:58:32 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2021-06-17 09:37:24 +00:00
|
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
2021-06-14 19:58:32 +00:00
|
|
|
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
|
2022-06-03 04:26:56 +00:00
|
|
|
index 8d5154cad319d7762db696cd9cd2bf8ab69f632e..65335a8dc42366c5318d583097b24443dc3c9616 100644
|
2021-06-14 19:58:32 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
2022-01-14 03:56:45 +00:00
|
|
|
@@ -625,6 +625,14 @@ public abstract class PlayerList {
|
2021-06-14 19:58:32 +00:00
|
|
|
PlayerList.LOGGER.debug("Removing player mount");
|
|
|
|
entityplayer.stopRiding();
|
|
|
|
entity.getPassengersAndSelf().forEach((entity1) -> {
|
|
|
|
+ // Paper start
|
2021-11-24 18:27:25 +00:00
|
|
|
+ if (entity1 instanceof net.minecraft.world.entity.npc.AbstractVillager villager) {
|
2021-06-14 19:58:32 +00:00
|
|
|
+ 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);
|
|
|
|
});
|
|
|
|
}
|