mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +01:00
AFK API
This commit is contained in:
committed by
granny
parent
c5902528c1
commit
fb0d9a1cd6
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/EntityGetter.java
|
||||
+++ b/net/minecraft/world/level/EntityGetter.java
|
||||
@@ -185,7 +_,7 @@
|
||||
|
||||
default boolean hasNearbyAlivePlayer(double x, double y, double z, double distance) {
|
||||
for (Player player : this.players()) {
|
||||
- if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
|
||||
+ if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player) && EntitySelector.notAfk.test(player)) { // Purpur - AFK API
|
||||
double d = player.distanceToSqr(x, y, z);
|
||||
if (distance < 0.0 || d < distance * distance) {
|
||||
return true;
|
||||
Reference in New Issue
Block a user