9
0
mirror of https://github.com/Auxilor/EcoMobs.git synced 2025-12-19 23:19:17 +00:00

Compare commits

...

15 Commits

Author SHA1 Message Date
Will FP
2822acc1ac libreforge-updater 2025-10-06 08:57:36 +01:00
Will FP
1ec94615c9 Fixed drops being sent twice 2025-10-05 18:07:22 +01:00
Will FP
88192c6d8f Fixed massive bug with mob eggs 2025-10-05 15:26:32 +01:00
Will FP
f138127c27 Updated to java 21 2025-10-04 15:36:18 +01:00
Will FP
a808141dc2 libreforge-updater 2025-09-11 09:59:41 +01:00
Will FP
6bab63a50c libreforge-updater 2025-08-01 10:05:38 +01:00
Will FP
828c44dfa4 libreforge-updater 2025-07-05 16:46:16 +01:00
Will FP
597b18b953 libreforge-updater 2025-07-04 09:51:39 +01:00
Will FP
5c294b3fdf libreforge-updater 2025-03-29 14:22:43 +00:00
Will FP
4617528481 libreforge-updater 2025-01-31 11:55:35 +00:00
Will FP
b062ea3e0a libreforge-updater 2025-01-25 13:50:23 +00:00
Will FP
a1dcd0e2c7 Fix 2025-01-25 13:49:21 +00:00
Will FP
af70faa26f libreforge-updater 2025-01-25 13:46:18 +00:00
Will FP
21056bddec libreforge-updater 2024-11-06 18:35:16 +00:00
Will FP
8d1da21565 libreforge-updater 2024-10-22 12:16:17 +01:00
6 changed files with 26 additions and 14 deletions

View File

@@ -1,9 +1,11 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins { plugins {
java java
`java-library` `java-library`
`maven-publish` `maven-publish`
kotlin("jvm") version "1.9.20" kotlin("jvm") version "2.1.0"
id("io.github.goooler.shadow") version "8.1.7" id("com.gradleup.shadow") version "8.3.0"
id("com.willfp.libreforge-gradle-plugin") version "1.0.0" id("com.willfp.libreforge-gradle-plugin") version "1.0.0"
} }
@@ -23,7 +25,7 @@ allprojects {
apply(plugin = "java") apply(plugin = "java")
apply(plugin = "kotlin") apply(plugin = "kotlin")
apply(plugin = "maven-publish") apply(plugin = "maven-publish")
apply(plugin = "io.github.goooler.shadow") apply(plugin = "com.gradleup.shadow")
repositories { repositories {
mavenLocal() mavenLocal()
@@ -38,13 +40,13 @@ allprojects {
dependencies { dependencies {
compileOnly("com.willfp:eco:6.67.0") compileOnly("com.willfp:eco:6.67.0")
compileOnly("org.jetbrains:annotations:23.0.0") compileOnly("org.jetbrains:annotations:23.0.0")
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.20") compileOnly("org.jetbrains.kotlin:kotlin-stdlib:2.1.0")
compileOnly("com.github.ben-manes.caffeine:caffeine:3.1.5") compileOnly("com.github.ben-manes.caffeine:caffeine:3.1.5")
} }
java { java {
withSourcesJar() withSourcesJar()
toolchain.languageVersion.set(JavaLanguageVersion.of(17)) toolchain.languageVersion.set(JavaLanguageVersion.of(21))
} }
tasks { tasks {
@@ -54,8 +56,8 @@ allprojects {
} }
compileKotlin { compileKotlin {
kotlinOptions { compilerOptions {
jvmTarget = "17" jvmTarget.set(JvmTarget.JVM_21)
} }
} }

View File

@@ -4,7 +4,7 @@ version = rootProject.version
dependencies { dependencies {
compileOnly("io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT")
compileOnly("io.github.arcaneplugins:levelledmobs-plugin:4.0.2") compileOnly("io.github.arcaneplugins:levelledmobs-plugin:4.0.2")
compileOnly("LibsDisguises:LibsDisguises:10.0.38") compileOnly("LibsDisguises:LibsDisguises:10.0.15")
implementation("com.willfp:ModelEngineBridge:1.0.0") implementation("com.willfp:ModelEngineBridge:1.0.0")
} }

View File

@@ -11,6 +11,7 @@ import com.willfp.eco.core.fast.fast
import com.willfp.eco.core.items.CustomItem import com.willfp.eco.core.items.CustomItem
import com.willfp.eco.core.items.Items import com.willfp.eco.core.items.Items
import com.willfp.eco.core.items.builder.modify 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.Recipes
import com.willfp.eco.core.recipe.parts.EmptyTestableItem import com.willfp.eco.core.recipe.parts.EmptyTestableItem
import com.willfp.eco.util.NamespacedKeyUtils import com.willfp.eco.util.NamespacedKeyUtils
@@ -263,7 +264,9 @@ internal class ConfigDrivenEcoMob(
CustomItem( CustomItem(
plugin.createNamespacedKey("${this.id}_spawn_egg"), plugin.createNamespacedKey("${this.id}_spawn_egg"),
{ item.fast().ecoMobEgg == this }, {
it.fast().ecoMobEgg == this@ConfigDrivenEcoMob
},
item item
).register() ).register()

View File

@@ -46,6 +46,9 @@ internal class LivingMobImpl(
override val ticksLeft: Int override val ticksLeft: Int
get() = mob.lifespan - tick get() = mob.lifespan - tick
// Fix for drops being sent twice
private var hasBeenKilled = false
fun addTickHandler(handler: TickHandler) { fun addTickHandler(handler: TickHandler) {
tickHandlers += handler tickHandlers += handler
} }
@@ -80,7 +83,11 @@ internal class LivingMobImpl(
override fun kill(player: Player?, removeTracking: Boolean) { override fun kill(player: Player?, removeTracking: Boolean) {
handleRemove(removeTracking = removeTracking) handleRemove(removeTracking = removeTracking)
mob.spawnDrops(entity.location, player) if (!hasBeenKilled) {
mob.spawnDrops(entity.location, player)
}
hasBeenKilled = true
} }
override fun despawn() { override fun despawn() {

View File

@@ -1,7 +1,7 @@
name: ${pluginName} name: ${pluginName}
version: ${version} version: ${version}
main: com.willfp.ecomobs.EcoMobsPlugin main: com.willfp.ecomobs.EcoMobsPlugin
api-version: 1.17 api-version: 1.21.4
authors: [ Auxilor ] authors: [ Auxilor ]
website: willfp.com website: willfp.com
depend: depend:

View File

@@ -1,5 +1,5 @@
#libreforge-updater #libreforge-updater
#Sun Sep 22 17:03:30 BST 2024 #Mon Oct 06 08:57:36 BST 2025
kotlin.code.style=official kotlin.code.style=official
libreforge-version=4.72.0 libreforge-version=4.79.0
version=10.17.0 version=10.24.0