Ensure EntityRaider respects game and entity rules for picking up items

This commit is contained in:
kickash32 2020-05-09 02:01:48 -04:00
parent 74343ef1be
commit ed712d373a

View File

@ -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();