mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Ensure EntityRaider respects game and entity rules for picking up items
This commit is contained in:
parent
74343ef1be
commit
ed712d373a
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user