Skip to content

Commit 3d1425f

Browse files
authored
Fix phantoms failing to target players near non-insomniacs (#12953)
1 parent abf6b6c commit 3d1425f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

paper-server/patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@
4343
}
4444

4545
@Override
46-
@@ -258,7 +_,8 @@
46+
@@ -258,8 +_,10 @@
4747

4848
for (Player player : nearbyPlayers) {
4949
if (Phantom.this.canAttack(serverLevel, player, TargetingConditions.DEFAULT)) {
5050
- Phantom.this.setTarget(player);
51-
+ if (!level().paperConfig().entities.behavior.phantomsOnlyAttackInsomniacs || EntitySelector.IS_INSOMNIAC.test(player)) // Paper - Add phantom creative and insomniac controls
51+
+ if (!level().paperConfig().entities.behavior.phantomsOnlyAttackInsomniacs || EntitySelector.IS_INSOMNIAC.test(player)) { // Paper - Add phantom creative and insomniac controls
5252
+ Phantom.this.setTarget(player, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER); // CraftBukkit - reason
5353
return true;
54+
+ } // Paper - Add phantom creative and insomniac controls
5455
}
5556
}
57+
}

0 commit comments

Comments
 (0)