Compare commits

...

6 Commits

Author SHA1 Message Date
Will FP
b42dfe9be2 libreforge-updater 2023-12-24 14:55:01 +01:00
Auxilor
ea66d98df8 libreforge-updater 2023-12-20 15:57:14 +00:00
Will FP
2cc0d6b3c2 libreforge-updater 2023-12-14 16:13:55 +00:00
Will FP
8e2006fa2c libreforge-updater 2023-12-11 12:13:10 +00:00
Will FP
e8c387e85c libreforge-updater 2023-12-07 17:26:10 +00:00
Will FP
7a82b73b96 Updated to use ModelEngineBridge 2023-12-03 16:07:31 +00:00
6 changed files with 11 additions and 30 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.55.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 {
@@ -52,6 +52,7 @@ allprojects {
shadowJar {
relocate("com.willfp.libreforge.loader", "com.willfp.ecopets.libreforge.loader")
relocate("com.willfp.ecomponent", "com.willfp.ecopets.ecomponent")
relocate("com.willfp.modelenginebridge", "com.willfp.ecopets.modelenginebridge")
}
compileKotlin {

View File

@@ -3,10 +3,10 @@ version = rootProject.version
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
compileOnly("com.ticxo.modelengine:api:R3.1.8")
compileOnly("com.github.ben-manes.caffeine:caffeine:3.0.2")
implementation("com.willfp:ecomponent:1.3.0")
implementation("com.willfp:ModelEngineBridge:1.2.0")
}
publishing {

View File

@@ -114,7 +114,6 @@ class Pet(
}
val entityTexture = config.getString("entity-texture")
val modelEngineAnimation = config.getStringOrNull("modelengine-animation")
private val levelXpRequirements = listOf(0) + config.getInts("level-xp-requirements")

View File

@@ -1,8 +1,8 @@
package com.willfp.ecopets.pets.entity
import com.ticxo.modelengine.api.ModelEngineAPI
import com.willfp.ecopets.EcoPetsPlugin
import com.willfp.ecopets.pets.Pet
import com.willfp.modelenginebridge.ModelEngineBridge
import org.bukkit.Location
import org.bukkit.entity.ArmorStand
@@ -13,29 +13,11 @@ class ModelEnginePetEntity(
) : PetEntity(pet) {
override fun spawn(location: Location): ArmorStand {
val stand = emptyArmorStandAt(location, pet)
val meAnimation = pet.modelEngineAnimation
val model = ModelEngineAPI.createActiveModel(modelID)
val model = ModelEngineBridge.instance.createActiveModel(modelID) ?: return stand
if (meAnimation != null) {
val animationHandler = model.animationHandler
val animationProperty = animationHandler.getAnimation(meAnimation)
if (animationProperty != null) {
animationHandler.playAnimation(animationProperty, true)
} else {
plugin.logger.warning("Animation $meAnimation not found in model $modelID, defaulting to walk!")
val animationPropertyWalk = animationHandler.getAnimation("walk")
if (animationPropertyWalk != null) {
animationHandler.playAnimation(animationPropertyWalk, true)
} else {
plugin.logger.warning("Walk animation not found in $modelID!")
}
}
}
val modelled = ModelEngineAPI.createModeledEntity(stand)
modelled.addModel(model, true)
val modelled = ModelEngineBridge.instance.createModeledEntity(stand)
modelled.addModel(model)
return stand
}

View File

@@ -116,7 +116,6 @@ conditions: [ ]
# The texture of the pet entity in game
# If you're using modelengine, use modelengine:id as the texture
entity-texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTA5NWZjYzFlM2Q3Y2JkMzUwZjE5YjM4OTQ5OGFiOGJiOTZjNjVhZDE4NWQzNDU5MjA2N2E3ZDAzM2FjNDhkZSJ9fX0="
modelengine-animation: "fly" # If you're using ModelEngine, you can specify an animation here
# The icon in GUIs
icon: player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTA5NWZjYzFlM2Q3Y2JkMzUwZjE5YjM4OTQ5OGFiOGJiOTZjNjVhZDE4NWQzNDU5MjA2N2E3ZDAzM2FjNDhkZSJ9fX0=

View File

@@ -1,5 +1,5 @@
#libreforge-updater
#Sun Dec 03 15:59:57 GMT 2023
#Sun Dec 24 14:55:01 CET 2023
kotlin.code.style=official
libreforge-version=4.48.0
version=2.48.0
libreforge-version=4.51.0
version=2.51.0