Ensure EntityRaider respects game and entity rules for picking up items
This commit is contained in:
@@ -28,7 +28,15 @@
|
|||||||
this.mob = entityraider;
|
this.mob = entityraider;
|
||||||
this.setFlags(EnumSet.of(Goal.Flag.MOVE));
|
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 Raider mob;
|
||||||
private final float hostileRadiusSqr;
|
private final float hostileRadiusSqr;
|
||||||
@@ -547,7 +550,7 @@
|
@@ -547,7 +551,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Raider entityraider = (Raider) iterator.next();
|
Raider entityraider = (Raider) iterator.next();
|
||||||
|
|
||||||
@@ -46,7 +54,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -564,7 +567,7 @@
|
@@ -564,7 +568,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Raider entityraider = (Raider) iterator.next();
|
Raider entityraider = (Raider) iterator.next();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user