mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-19 23:19:17 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e82cd59d72 | ||
|
|
6e384c248d | ||
|
|
e83cafb752 | ||
|
|
a4aa97006a | ||
|
|
3d1dce4567 | ||
|
|
45ef970521 | ||
|
|
16c9640163 |
@@ -2,7 +2,7 @@ plugins {
|
|||||||
java
|
java
|
||||||
`java-library`
|
`java-library`
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
kotlin("jvm") version "1.7.10"
|
kotlin("jvm") version "1.9.20"
|
||||||
id("com.github.johnrengelman.shadow") version "8.0.0"
|
id("com.github.johnrengelman.shadow") version "8.0.0"
|
||||||
id("com.willfp.libreforge-gradle-plugin") version "1.0.0"
|
id("com.willfp.libreforge-gradle-plugin") version "1.0.0"
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@ allprojects {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("com.willfp:eco:6.56.0")
|
compileOnly("com.willfp:eco:6.56.0")
|
||||||
compileOnly("org.jetbrains:annotations:23.0.0")
|
compileOnly("org.jetbrains:annotations:23.0.0")
|
||||||
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.7.10")
|
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.20")
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
@@ -51,6 +51,7 @@ allprojects {
|
|||||||
tasks {
|
tasks {
|
||||||
shadowJar {
|
shadowJar {
|
||||||
relocate("com.willfp.libreforge.loader", "com.willfp.ecobosses.libreforge.loader")
|
relocate("com.willfp.libreforge.loader", "com.willfp.ecobosses.libreforge.loader")
|
||||||
|
relocate("com.willfp.modelenginebridge", "com.willfp.ecobosses.modelenginebridge")
|
||||||
}
|
}
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ version = rootProject.version
|
|||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
|
compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
|
||||||
compileOnly("com.github.lokka30:LevelledMobs:3.1.4")
|
compileOnly("com.github.lokka30:LevelledMobs:3.1.4")
|
||||||
compileOnly("com.ticxo.modelengine:api:R3.1.8")
|
implementation("com.willfp:ModelEngineBridge:1.2.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.willfp.ecobosses.bosses
|
package com.willfp.ecobosses.bosses
|
||||||
|
|
||||||
import com.ticxo.modelengine.api.ModelEngineAPI
|
|
||||||
import com.willfp.eco.core.EcoPlugin
|
import com.willfp.eco.core.EcoPlugin
|
||||||
import com.willfp.eco.core.config.interfaces.Config
|
import com.willfp.eco.core.config.interfaces.Config
|
||||||
import com.willfp.eco.core.entities.CustomEntity
|
import com.willfp.eco.core.entities.CustomEntity
|
||||||
@@ -42,6 +41,7 @@ import com.willfp.libreforge.Holder
|
|||||||
import com.willfp.libreforge.ViolationContext
|
import com.willfp.libreforge.ViolationContext
|
||||||
import com.willfp.libreforge.conditions.Conditions
|
import com.willfp.libreforge.conditions.Conditions
|
||||||
import com.willfp.libreforge.effects.Effects
|
import com.willfp.libreforge.effects.Effects
|
||||||
|
import com.willfp.modelenginebridge.ModelEngineBridge
|
||||||
import net.kyori.adventure.bossbar.BossBar
|
import net.kyori.adventure.bossbar.BossBar
|
||||||
import org.bukkit.Bukkit
|
import org.bukkit.Bukkit
|
||||||
import org.bukkit.Location
|
import org.bukkit.Location
|
||||||
@@ -306,8 +306,6 @@ class EcoBoss(
|
|||||||
|
|
||||||
private val modelEngineID = config.getStringOrNull("model-engine-id")
|
private val modelEngineID = config.getStringOrNull("model-engine-id")
|
||||||
|
|
||||||
private val modelEngineAnimation = config.getStringOrNull("model-engine-animation")
|
|
||||||
|
|
||||||
private val currentlyAlive = mutableMapOf<UUID, LivingEcoBoss>()
|
private val currentlyAlive = mutableMapOf<UUID, LivingEcoBoss>()
|
||||||
|
|
||||||
override val conditions = Conditions.compile(
|
override val conditions = Conditions.compile(
|
||||||
@@ -357,32 +355,15 @@ class EcoBoss(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (modelEngineID != null && Bukkit.getPluginManager().isPluginEnabled("ModelEngine")) {
|
if (modelEngineID != null && Bukkit.getPluginManager().isPluginEnabled("ModelEngine")) {
|
||||||
val model = ModelEngineAPI.createActiveModel(modelEngineID)
|
val model = ModelEngineBridge.instance.createActiveModel(modelEngineID)
|
||||||
|
|
||||||
if (model == null) {
|
if (model == null) {
|
||||||
plugin.logger.warning("Invalid Model Engine ID for boss $id")
|
plugin.logger.warning("Invalid Model Engine ID for boss $id")
|
||||||
|
} else {
|
||||||
|
val modelled = ModelEngineBridge.instance.createModeledEntity(mob)
|
||||||
|
modelled.addModel(model)
|
||||||
|
modelled.isBaseEntityVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modelEngineAnimation != null) {
|
|
||||||
val animationHandler = model.animationHandler
|
|
||||||
val animationProperty = animationHandler.getAnimation(modelEngineAnimation)
|
|
||||||
|
|
||||||
if (animationProperty != null) {
|
|
||||||
animationHandler.playAnimation(animationProperty, true)
|
|
||||||
} else {
|
|
||||||
plugin.logger.warning("Animation $modelEngineAnimation not found in model $modelEngineID, defaulting to walk!")
|
|
||||||
val animationPropertyWalk = animationHandler.getAnimation("walk")
|
|
||||||
if (animationPropertyWalk != null) {
|
|
||||||
animationHandler.playAnimation(animationPropertyWalk, true)
|
|
||||||
} else {
|
|
||||||
plugin.logger.warning("Walk animation not found in $modelEngineID!")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val modelled = ModelEngineAPI.createModeledEntity(mob)
|
|
||||||
modelled.addModel(model, true)
|
|
||||||
modelled.isBaseEntityVisible = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val boss = LivingEcoBoss(
|
val boss = LivingEcoBoss(
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
mob: illusioner attack-damage:50 health:600 hand:"iron_sword sharpness:5"
|
mob: illusioner attack-damage:50 health:600 hand:"iron_sword sharpness:5"
|
||||||
|
|
||||||
model-engine-id: ""
|
model-engine-id: ""
|
||||||
model-engine-animation: ""
|
|
||||||
|
|
||||||
display-name: "&9Illusioner &7| &c%health%♥ &7| &e%time%"
|
display-name: "&9Illusioner &7| &c%health%♥ &7| &e%time%"
|
||||||
|
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
name: ${pluginName}
|
|
||||||
version: ${version}
|
|
||||||
main: com.willfp.ecobosses.EcoBossesPlugin
|
|
||||||
api-version: 1.19
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
- name: eco
|
|
||||||
required: true
|
|
||||||
bootstrap: false
|
|
||||||
|
|
||||||
- name: libreforge
|
|
||||||
required: false
|
|
||||||
bootstrap: false
|
|
||||||
|
|
||||||
load-after:
|
|
||||||
- name: eco
|
|
||||||
bootstrap: false
|
|
||||||
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
ecobosses.*:
|
|
||||||
description: All ecobosses permissions
|
|
||||||
default: op
|
|
||||||
children:
|
|
||||||
ecobosses.command.*: true
|
|
||||||
ecobosses.command.*:
|
|
||||||
description: All ecobosses commands
|
|
||||||
default: op
|
|
||||||
children:
|
|
||||||
ecobosses.command.ecobosses: true
|
|
||||||
ecobosses.command.reload: true
|
|
||||||
ecobosses.command.spawn: true
|
|
||||||
ecobosses.command.give: true
|
|
||||||
|
|
||||||
ecobosses.command.ecobosses:
|
|
||||||
description: Allows the use of /ecobosses
|
|
||||||
default: true
|
|
||||||
|
|
||||||
ecobosses.command.give:
|
|
||||||
description: Allows the use of /ecobosses give
|
|
||||||
default: op
|
|
||||||
|
|
||||||
ecobosses.command.spawn:
|
|
||||||
description: Allows the use of /ecobosses spawn
|
|
||||||
default: op
|
|
||||||
|
|
||||||
ecobosses.command.killall:
|
|
||||||
description: Allows the use of /ecobosses killall
|
|
||||||
default: op
|
|
||||||
|
|
||||||
ecobosses.command.reload:
|
|
||||||
description: Allows the use of /ecobosses reload
|
|
||||||
default: op
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#libreforge-updater
|
#libreforge-updater
|
||||||
#Sun Nov 26 23:24:25 GMT 2023
|
#Wed Dec 20 15:56:34 GMT 2023
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
libreforge-version=4.46.0
|
libreforge-version=4.50.0
|
||||||
version=9.45.0
|
version=9.49.0
|
||||||
|
|||||||
Reference in New Issue
Block a user