From 6888a8c7bc1f9cdf0caccb8f034b611122e07ee9 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 23 Mar 2025 09:24:54 +0700 Subject: [PATCH] Rearrange goals --- .../kotlin/ru/dbotthepony/mc/otm/entity/Enforcer.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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 bd6fc5f1b..5b2b6be3c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Enforcer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Enforcer.kt @@ -73,7 +73,12 @@ class Enforcer(type: EntityType, level: Level) : Monster(type,level) { } override fun registerGoals() { - goalSelector.addGoal(7, LookAtPlayerGoal(this, Player::class.java, 8f)) + 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 -> entity is Player || entity is Villager || @@ -82,11 +87,7 @@ 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)) - - targetSelector.addGoal(1, HurtByTargetGoal(this)) + goalSelector.addGoal(7, LookAtPlayerGoal(this, Player::class.java, 8f)) } override fun createNavigation(level: Level): PathNavigation = GroundPathNavigation(this, level)