mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-19 15:09:17 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2822acc1ac | ||
|
|
1ec94615c9 | ||
|
|
88192c6d8f | ||
|
|
f138127c27 | ||
|
|
a808141dc2 | ||
|
|
6bab63a50c | ||
|
|
828c44dfa4 | ||
|
|
597b18b953 |
@@ -46,7 +46,7 @@ allprojects {
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
}
|
||||
|
||||
tasks {
|
||||
@@ -57,7 +57,7 @@ allprojects {
|
||||
|
||||
compileKotlin {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_17)
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.willfp.eco.core.fast.fast
|
||||
import com.willfp.eco.core.items.CustomItem
|
||||
import com.willfp.eco.core.items.Items
|
||||
import com.willfp.eco.core.items.builder.modify
|
||||
import com.willfp.eco.core.items.toSNBT
|
||||
import com.willfp.eco.core.recipe.Recipes
|
||||
import com.willfp.eco.core.recipe.parts.EmptyTestableItem
|
||||
import com.willfp.eco.util.NamespacedKeyUtils
|
||||
@@ -263,7 +264,9 @@ internal class ConfigDrivenEcoMob(
|
||||
|
||||
CustomItem(
|
||||
plugin.createNamespacedKey("${this.id}_spawn_egg"),
|
||||
{ item.fast().ecoMobEgg == this },
|
||||
{
|
||||
it.fast().ecoMobEgg == this@ConfigDrivenEcoMob
|
||||
},
|
||||
item
|
||||
).register()
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ internal class LivingMobImpl(
|
||||
override val ticksLeft: Int
|
||||
get() = mob.lifespan - tick
|
||||
|
||||
// Fix for drops being sent twice
|
||||
private var hasBeenKilled = false
|
||||
|
||||
fun addTickHandler(handler: TickHandler) {
|
||||
tickHandlers += handler
|
||||
}
|
||||
@@ -80,9 +83,13 @@ internal class LivingMobImpl(
|
||||
override fun kill(player: Player?, removeTracking: Boolean) {
|
||||
handleRemove(removeTracking = removeTracking)
|
||||
|
||||
if (!hasBeenKilled) {
|
||||
mob.spawnDrops(entity.location, player)
|
||||
}
|
||||
|
||||
hasBeenKilled = true
|
||||
}
|
||||
|
||||
override fun despawn() {
|
||||
entity.remove()
|
||||
handleRemove()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: ${pluginName}
|
||||
version: ${version}
|
||||
main: com.willfp.ecomobs.EcoMobsPlugin
|
||||
api-version: 1.17
|
||||
api-version: 1.21.4
|
||||
authors: [ Auxilor ]
|
||||
website: willfp.com
|
||||
depend:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#libreforge-updater
|
||||
#Sat Mar 29 14:22:43 GMT 2025
|
||||
#Mon Oct 06 08:57:36 BST 2025
|
||||
kotlin.code.style=official
|
||||
libreforge-version=4.75.0
|
||||
version=10.20.0
|
||||
libreforge-version=4.79.0
|
||||
version=10.24.0
|
||||
|
||||
Reference in New Issue
Block a user