mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-19 15:09:17 +00:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2822acc1ac | ||
|
|
1ec94615c9 | ||
|
|
88192c6d8f | ||
|
|
f138127c27 | ||
|
|
a808141dc2 | ||
|
|
6bab63a50c | ||
|
|
828c44dfa4 | ||
|
|
597b18b953 | ||
|
|
5c294b3fdf | ||
|
|
4617528481 | ||
|
|
b062ea3e0a | ||
|
|
a1dcd0e2c7 | ||
|
|
af70faa26f | ||
|
|
21056bddec | ||
|
|
8d1da21565 | ||
|
|
44b5c540aa | ||
|
|
b0378a579d | ||
|
|
17579458d2 | ||
|
|
31d9bfd8f3 | ||
|
|
be2320b3a3 | ||
|
|
0ca4886c5d | ||
|
|
ecf183d175 | ||
|
|
100adf8382 | ||
|
|
aeb40958dd | ||
|
|
e8de0d041d | ||
|
|
f887e15992 | ||
|
|
6d69e9c825 | ||
|
|
ccbf8c8fd0 | ||
|
|
b5ace8f36e | ||
|
|
86352ba528 | ||
|
|
f22c290ff5 | ||
|
|
d1afab2ed6 | ||
|
|
6a335a5371 | ||
|
|
f3f2d581e3 |
@@ -1,9 +1,11 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
java
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
kotlin("jvm") version "1.9.20"
|
||||
id("io.github.goooler.shadow") version "8.1.7"
|
||||
kotlin("jvm") version "2.1.0"
|
||||
id("com.gradleup.shadow") version "8.3.0"
|
||||
id("com.willfp.libreforge-gradle-plugin") version "1.0.0"
|
||||
}
|
||||
|
||||
@@ -23,7 +25,7 @@ allprojects {
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "kotlin")
|
||||
apply(plugin = "maven-publish")
|
||||
apply(plugin = "io.github.goooler.shadow")
|
||||
apply(plugin = "com.gradleup.shadow")
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
@@ -38,7 +40,7 @@ allprojects {
|
||||
dependencies {
|
||||
compileOnly("com.willfp:eco:6.67.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")
|
||||
}
|
||||
|
||||
@@ -54,8 +56,8 @@ allprojects {
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "21"
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ version = rootProject.version
|
||||
dependencies {
|
||||
compileOnly("io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT")
|
||||
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")
|
||||
}
|
||||
|
||||
|
||||
@@ -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,7 +83,11 @@ internal class LivingMobImpl(
|
||||
override fun kill(player: Player?, removeTracking: Boolean) {
|
||||
handleRemove(removeTracking = removeTracking)
|
||||
|
||||
mob.spawnDrops(entity.location, player)
|
||||
if (!hasBeenKilled) {
|
||||
mob.spawnDrops(entity.location, player)
|
||||
}
|
||||
|
||||
hasBeenKilled = true
|
||||
}
|
||||
|
||||
override fun despawn() {
|
||||
|
||||
@@ -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
|
||||
#Fri Jun 28 15:56:17 BST 2024
|
||||
#Mon Oct 06 08:57:36 BST 2025
|
||||
kotlin.code.style=official
|
||||
libreforge-version=4.63.0
|
||||
version=10.8.0
|
||||
libreforge-version=4.79.0
|
||||
version=10.24.0
|
||||
|
||||
Reference in New Issue
Block a user