Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
b31089a929
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d264e972 #591: Add option for a consumer before spawning an item 1c537fce #590: Add spawn and transform reasons for piglin zombification. CraftBukkit Changes: ee5006d1 #810: Add option for a consumer before spawning an item f6a39d3c #809: Add spawn and transform reasons for piglin zombification. 0c24068a Organise imports Spigot Changes: bff52619 Organise imports
27 Zeilen
1.3 KiB
Diff
27 Zeilen
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: jmp <jasonpenilla2@me.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/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
|
index c4abe7bdc1a9b725166eff8b77c123dd832b3cf9..fbe2b2b3f96232d86efa1bc02c780ec7cc54aa9b 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
@@ -538,6 +538,15 @@ public abstract class PlayerList {
|
|
|
|
for (Iterator iterator = entity.getAllPassengers().iterator(); iterator.hasNext(); entity1.dead = true) {
|
|
entity1 = (Entity) iterator.next();
|
|
+ // Paper start
|
|
+ if (entity1 instanceof EntityVillagerAbstract) {
|
|
+ final EntityVillagerAbstract villager = (EntityVillagerAbstract) entity1;
|
|
+ final EntityHuman human = villager.getTrader();
|
|
+ if (human != null) {
|
|
+ villager.setTradingPlayer(null);
|
|
+ }
|
|
+ }
|
|
+ // Paper end
|
|
worldserver.removeEntity(entity1);
|
|
}
|
|
|