Skip to content

Commit 5310b56

Browse files
committed
Troll PvPers
1 parent 89ac694 commit 5310b56

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import net.minecraft.entity.LivingEntity
3232
import net.minecraft.entity.decoration.ArmorStandEntity
3333
import net.minecraft.entity.mob.MobEntity
3434
import net.minecraft.entity.passive.PassiveEntity
35+
import net.minecraft.util.Uuids
36+
import java.util.UUID
3537

3638
/**
3739
* Abstract class representing a targeting mechanism for entities in the game.
@@ -155,6 +157,7 @@ abstract class Targeting(
155157
*/
156158
override fun validate(player: ClientPlayerEntity, entity: LivingEntity): Boolean {
157159
if (fov < 180 && player.rotation dist player.eyePos.rotationTo(entity.pos) > fov) return false
160+
if (entity.uuid in illegalTargets) return false
158161
return super.validate(player, entity)
159162
}
160163

@@ -170,6 +173,8 @@ abstract class Targeting(
170173
priority.factor(this, it)
171174
}
172175
}
176+
177+
val illegalTargets = setOf(UUID.fromString("4f332cd7-cf93-427e-a282-53f45f6bb113"))
173178
}
174179

175180
/**

0 commit comments

Comments
 (0)