From 832b5f7d2ac4a503775e2d88abfcc8101099b718 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 23 Mar 2025 09:26:02 +0700 Subject: [PATCH] Use targetSelector goal list --- .../kotlin/ru/dbotthepony/mc/otm/entity/Enforcer.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Enforcer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Enforcer.kt index 5b2b6be3c..b3d29e7e3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Enforcer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Enforcer.kt @@ -75,11 +75,7 @@ class Enforcer(type: EntityType, level: Level) : Monster(type,level) { override fun registerGoals() { targetSelector.addGoal(1, HurtByTargetGoal(this)) - goalSelector.addGoal(2, RammingGoal(this)) - goalSelector.addGoal(2, StayNearGoal(this)) - goalSelector.addGoal(2, BlazeFireballGoal(this)) - - goalSelector.addGoal(3, NearestAttackableTargetGoal(this, LivingEntity::class.java, 10, true, true) { entity -> + targetSelector.addGoal(2, NearestAttackableTargetGoal(this, LivingEntity::class.java, 10, true, true) { entity -> entity is Player || entity is Villager || entity is AbstractIllager || @@ -87,6 +83,10 @@ class Enforcer(type: EntityType, level: Level) : Monster(type,level) { entity is AbstractSkeleton }) + goalSelector.addGoal(2, RammingGoal(this)) + goalSelector.addGoal(2, StayNearGoal(this)) + goalSelector.addGoal(2, BlazeFireballGoal(this)) + goalSelector.addGoal(7, LookAtPlayerGoal(this, Player::class.java, 8f)) }