Skip to content

Commit b261586

Browse files
committed
fix: targeting group friend check
1 parent c8a099b commit b261586

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/kotlin/com/lambda/config/groups/Targeting.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ import com.lambda.threading.runSafe
2727
import com.lambda.util.math.VecUtils.distSq
2828
import com.lambda.util.world.fastEntitySearch
2929
import net.minecraft.client.network.ClientPlayerEntity
30+
import net.minecraft.client.network.OtherClientPlayerEntity
3031
import net.minecraft.entity.LivingEntity
3132
import net.minecraft.entity.decoration.ArmorStandEntity
3233
import net.minecraft.entity.mob.MobEntity
3334
import net.minecraft.entity.passive.PassiveEntity
34-
import net.minecraft.server.network.ServerPlayerEntity
3535

3636
/**
3737
* Abstract class representing a targeting mechanism for entities in the game.
@@ -112,7 +112,7 @@ abstract class Targeting(
112112
* @return `true` if the entity is valid for targeting, `false` otherwise.
113113
*/
114114
open fun validate(player: ClientPlayerEntity, entity: LivingEntity) = when {
115-
!players && (entity is ServerPlayerEntity && entity.isFriend) -> false
115+
!players && (entity is OtherClientPlayerEntity && entity.isFriend) -> false
116116
!animals && entity is PassiveEntity -> false
117117
!hostiles && entity is MobEntity -> false
118118
entity is ArmorStandEntity -> false

0 commit comments

Comments
 (0)