From ed712d373a47c009952d2f75e6d347d097b9e2f3 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sat, 9 May 2020 02:01:48 -0400 Subject: [PATCH] Ensure EntityRaider respects game and entity rules for picking up items --- .../minecraft/world/entity/raid/Raider.java.patch | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/world/entity/raid/Raider.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/raid/Raider.java.patch index 9035153406..4bdc9ce06f 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/raid/Raider.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/raid/Raider.java.patch @@ -28,7 +28,15 @@ this.mob = entityraider; this.setFlags(EnumSet.of(Goal.Flag.MOVE)); } -@@ -518,7 +521,7 @@ +@@ -335,6 +338,7 @@ + } + + private boolean cannotPickUpBanner() { ++ if (!getServerLevel(this.mob).getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_MOBGRIEFING) || !this.mob.canPickUpLoot()) return false; // Paper - respect game and entity rules for picking up items + if (!this.mob.hasActiveRaid()) { + return true; + } else if (this.mob.getCurrentRaid().isOver()) { +@@ -518,7 +522,7 @@ } } @@ -37,7 +45,7 @@ private final Raider mob; private final float hostileRadiusSqr; -@@ -547,7 +550,7 @@ +@@ -547,7 +551,7 @@ while (iterator.hasNext()) { Raider entityraider = (Raider) iterator.next(); @@ -46,7 +54,7 @@ } } -@@ -564,7 +567,7 @@ +@@ -564,7 +568,7 @@ while (iterator.hasNext()) { Raider entityraider = (Raider) iterator.next();