mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-19 15:09:17 +00:00
Compare commits
55 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 | ||
|
|
78dd714c6b | ||
|
|
a7268cc6bd | ||
|
|
3e2079d634 | ||
|
|
0cf9b376e0 | ||
|
|
94bcad4bdb | ||
|
|
8563c6b655 | ||
|
|
be542028b0 | ||
|
|
831d3661be | ||
|
|
bc14c675ad | ||
|
|
76d7076877 | ||
|
|
ff8b48587f | ||
|
|
23039a73f9 | ||
|
|
2e3324c405 | ||
|
|
c24d0876ca | ||
|
|
800ef7732a | ||
|
|
e6c82e6ac4 | ||
|
|
7008794445 | ||
|
|
c9aac17937 | ||
|
|
3c2f2ba315 | ||
|
|
d4a8665a6a | ||
|
|
eb0a5251d3 |
4
.github/workflows/publish-release.yml
vendored
4
.github/workflows/publish-release.yml
vendored
@@ -15,11 +15,11 @@ jobs:
|
|||||||
- name: Checkout latest code
|
- name: Checkout latest code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 21
|
||||||
|
|
||||||
- name: Change wrapper permissions
|
- name: Change wrapper permissions
|
||||||
run: chmod +x ./gradlew
|
run: chmod +x ./gradlew
|
||||||
|
|||||||
@@ -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("com.github.johnrengelman.shadow") version "8.0.0"
|
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 = "com.github.johnrengelman.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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ 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("com.github.lokka30:LevelledMobs:3.1.4")
|
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")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.willfp.ecomobs.category.spawning.impl
|
|||||||
|
|
||||||
import com.willfp.eco.core.config.interfaces.Config
|
import com.willfp.eco.core.config.interfaces.Config
|
||||||
import com.willfp.eco.core.entities.Entities
|
import com.willfp.eco.core.entities.Entities
|
||||||
|
import com.willfp.eco.util.randDouble
|
||||||
import com.willfp.ecomobs.EcoMobsPlugin
|
import com.willfp.ecomobs.EcoMobsPlugin
|
||||||
import com.willfp.ecomobs.category.MobCategory
|
import com.willfp.ecomobs.category.MobCategory
|
||||||
import com.willfp.ecomobs.category.spawning.SpawnMethod
|
import com.willfp.ecomobs.category.spawning.SpawnMethod
|
||||||
@@ -57,6 +58,10 @@ object SpawnMethodFactoryReplace : SpawnMethodFactory("replace") {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (randDouble(0.0, 100.0) > config.getDouble("chance")) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val mob = category.mobs.randomOrNull() ?: return
|
val mob = category.mobs.randomOrNull() ?: return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.willfp.ecomobs.integrations.levelledmobs
|
|||||||
import com.willfp.eco.core.integrations.Integration
|
import com.willfp.eco.core.integrations.Integration
|
||||||
import com.willfp.ecomobs.integrations.MobIntegration
|
import com.willfp.ecomobs.integrations.MobIntegration
|
||||||
import com.willfp.ecomobs.mob.impl.ecoMob
|
import com.willfp.ecomobs.mob.impl.ecoMob
|
||||||
import me.lokka30.levelledmobs.events.MobPreLevelEvent
|
import io.github.arcaneplugins.levelledmobs.events.MobPreLevelEvent
|
||||||
import org.bukkit.entity.Mob
|
import org.bukkit.entity.Mob
|
||||||
import org.bukkit.event.EventHandler
|
import org.bukkit.event.EventHandler
|
||||||
import org.bukkit.event.Listener
|
import org.bukkit.event.Listener
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ spawning:
|
|||||||
- zombie
|
- zombie
|
||||||
- skeleton
|
- skeleton
|
||||||
|
|
||||||
|
# The chance for the mob to override, as a percentage
|
||||||
|
chance: 100
|
||||||
|
|
||||||
|
|
||||||
# Options for custom spawning
|
# Options for custom spawning
|
||||||
custom:
|
custom:
|
||||||
|
|||||||
@@ -87,19 +87,11 @@ effects:
|
|||||||
# Ran from the perspective of the player
|
# Ran from the perspective of the player
|
||||||
any-attack: [ ]
|
any-attack: [ ]
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
# Effects ran when the mob takes damage
|
# Effects ran when the mob takes damage
|
||||||
# Ran from the perspective of the entity
|
# Ran from the perspective of the entity
|
||||||
take-damage: [ ]
|
take-damage: [ ]
|
||||||
|
|
||||||
# Effects ran when the player is damaged by the mob
|
# Effects ran when the player is damaged by the mob
|
||||||
=======
|
|
||||||
# Effects ran when the mob takes damage
|
|
||||||
# Ran from the perspective of the entity
|
|
||||||
take-damage: [ ]
|
|
||||||
|
|
||||||
# Effects ran when the player is damaged by the mob
|
|
||||||
>>>>>>> f031fb51c6a3787bc44e8bc099d3655e74366f70
|
|
||||||
# Ran from the perspective of the player
|
# Ran from the perspective of the player
|
||||||
damage-player: [ ]
|
damage-player: [ ]
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#libreforge-updater
|
#libreforge-updater
|
||||||
#Thu Feb 22 13:18:55 GMT 2024
|
#Mon Oct 06 08:57:36 BST 2025
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
libreforge-version=4.56.2
|
libreforge-version=4.79.0
|
||||||
version=10.1.2
|
version=10.24.0
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -2,12 +2,15 @@ pluginManagement {
|
|||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
maven("https://repo.jpenilla.xyz/snapshots/")
|
|
||||||
maven("https://repo.auxilor.io/repository/maven-public/")
|
maven("https://repo.auxilor.io/repository/maven-public/")
|
||||||
maven("https://repo.papermc.io/repository/maven-public/")
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
|
||||||
|
}
|
||||||
|
|
||||||
rootProject.name = "EcoMobs"
|
rootProject.name = "EcoMobs"
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
|
|||||||
Reference in New Issue
Block a user