Compare commits

..

2 Commits

Author SHA1 Message Date
Auxilor
8665df51cc Updated to 6.66.1 2023-11-07 13:46:39 +00:00
Auxilor
e306190109 Fixed custom AI goals on 1.20 2023-11-07 13:46:32 +00:00
2 changed files with 3 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package com.willfp.eco.internal.spigot.proxy.common.ai
import com.willfp.eco.core.entities.ai.CustomGoal
import com.willfp.eco.core.entities.ai.GoalFlag
import com.willfp.eco.internal.spigot.proxy.common.toBukkitEntity
import net.minecraft.world.entity.PathfinderMob
import net.minecraft.world.entity.ai.goal.Goal
import java.util.EnumSet
@@ -51,7 +52,7 @@ private class NMSCustomGoal<T : org.bukkit.entity.Mob>(
) : Goal() {
init {
@Suppress("UNCHECKED_CAST")
customEntityGoal.initialize(entity.bukkitMob as T)
customEntityGoal.initialize(entity.toBukkitEntity() as T)
this.setFlags(EnumSet.copyOf(customEntityGoal.flags.toNMSFlags()))
}

View File

@@ -1,3 +1,3 @@
version = 6.66.0
version = 6.66.1
plugin-name = eco
kotlin.code.style = official