mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-29 11:23:52 -07:00
Move patches around
This commit is contained in:
34
patches/server-remapped/Fix-villager-boat-exploit.patch
Normal file
34
patches/server-remapped/Fix-villager-boat-exploit.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.effect.MobEffectInstance;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
+import net.minecraft.world.entity.npc.AbstractVillager;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.GameRules;
|
||||
import net.minecraft.world.level.GameType;
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
|
||||
for (Iterator iterator = entity.getIndirectPassengers().iterator(); iterator.hasNext(); entity1.removed = true) {
|
||||
entity1 = (Entity) iterator.next();
|
||||
+ // Paper start
|
||||
+ if (entity1 instanceof AbstractVillager) {
|
||||
+ final AbstractVillager villager = (AbstractVillager) entity1;
|
||||
+ final net.minecraft.world.entity.player.Player human = villager.getTradingPlayer();
|
||||
+ if (human != null) {
|
||||
+ villager.setTradingPlayer(null);
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
worldserver.despawn(entity1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user