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

Compare commits

...

7 Commits

Author SHA1 Message Date
Auxilor
e82cd59d72 libreforge-updater 2023-12-20 15:56:34 +00:00
Will FP
6e384c248d libreforge-updater 2023-12-14 16:13:22 +00:00
Will FP
e83cafb752 libreforge-updater 2023-12-11 12:12:40 +00:00
Will FP
a4aa97006a libreforge-updater 2023-12-07 17:25:29 +00:00
Will FP
3d1dce4567 Switched to ModelEngineBridge 2023-12-03 16:04:46 +00:00
Will FP
45ef970521 libreforge-updater 2023-12-03 15:58:59 +00:00
Will FP
16c9640163 libreforge-updater 2023-11-30 14:27:19 +00:00
6 changed files with 13 additions and 85 deletions

View File

@@ -2,7 +2,7 @@ plugins {
java
`java-library`
`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.willfp.libreforge-gradle-plugin") version "1.0.0"
}
@@ -40,7 +40,7 @@ allprojects {
dependencies {
compileOnly("com.willfp:eco:6.56.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 {
@@ -51,6 +51,7 @@ allprojects {
tasks {
shadowJar {
relocate("com.willfp.libreforge.loader", "com.willfp.ecobosses.libreforge.loader")
relocate("com.willfp.modelenginebridge", "com.willfp.ecobosses.modelenginebridge")
}
compileKotlin {

View File

@@ -4,7 +4,7 @@ version = rootProject.version
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
compileOnly("com.github.lokka30:LevelledMobs:3.1.4")
compileOnly("com.ticxo.modelengine:api:R3.1.8")
implementation("com.willfp:ModelEngineBridge:1.2.0")
}
publishing {

View File

@@ -1,6 +1,5 @@
package com.willfp.ecobosses.bosses
import com.ticxo.modelengine.api.ModelEngineAPI
import com.willfp.eco.core.EcoPlugin
import com.willfp.eco.core.config.interfaces.Config
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.conditions.Conditions
import com.willfp.libreforge.effects.Effects
import com.willfp.modelenginebridge.ModelEngineBridge
import net.kyori.adventure.bossbar.BossBar
import org.bukkit.Bukkit
import org.bukkit.Location
@@ -306,8 +306,6 @@ class EcoBoss(
private val modelEngineID = config.getStringOrNull("model-engine-id")
private val modelEngineAnimation = config.getStringOrNull("model-engine-animation")
private val currentlyAlive = mutableMapOf<UUID, LivingEcoBoss>()
override val conditions = Conditions.compile(
@@ -357,32 +355,15 @@ class EcoBoss(
}
if (modelEngineID != null && Bukkit.getPluginManager().isPluginEnabled("ModelEngine")) {
val model = ModelEngineAPI.createActiveModel(modelEngineID)
val model = ModelEngineBridge.instance.createActiveModel(modelEngineID)
if (model == null) {
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(

View File

@@ -1,7 +1,6 @@
mob: illusioner attack-damage:50 health:600 hand:"iron_sword sharpness:5"
model-engine-id: ""
model-engine-animation: ""
display-name: "&9Illusioner &7| &c%health%♥ &7| &e%time%"

View File

@@ -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

View File

@@ -1,5 +1,5 @@
#libreforge-updater
#Sun Nov 26 23:24:25 GMT 2023
#Wed Dec 20 15:56:34 GMT 2023
kotlin.code.style=official
libreforge-version=4.46.0
version=9.45.0
libreforge-version=4.50.0
version=9.49.0