Fix phantoms failing to target players near non-insomniacs (#12953)
This commit is contained in:
@@ -43,13 +43,15 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -258,7 +_,8 @@
|
||||
@@ -258,8 +_,10 @@
|
||||
|
||||
for (Player player : nearbyPlayers) {
|
||||
if (Phantom.this.canAttack(serverLevel, player, TargetingConditions.DEFAULT)) {
|
||||
- Phantom.this.setTarget(player);
|
||||
+ if (!level().paperConfig().entities.behavior.phantomsOnlyAttackInsomniacs || EntitySelector.IS_INSOMNIAC.test(player)) // Paper - Add phantom creative and insomniac controls
|
||||
+ if (!level().paperConfig().entities.behavior.phantomsOnlyAttackInsomniacs || EntitySelector.IS_INSOMNIAC.test(player)) { // Paper - Add phantom creative and insomniac controls
|
||||
+ Phantom.this.setTarget(player, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER); // CraftBukkit - reason
|
||||
return true;
|
||||
+ } // Paper - Add phantom creative and insomniac controls
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user