Use targetSelector goal list
This commit is contained in:
parent
6888a8c7bc
commit
832b5f7d2a
@ -75,11 +75,7 @@ class Enforcer(type: EntityType<Enforcer>, 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<Enforcer>, 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))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user