Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36195e16ce | ||
|
|
bae0ab6150 | ||
|
|
4445c7f681 | ||
|
|
8285613d15 | ||
|
|
855aa29e4b | ||
|
|
92f47d1c87 | ||
|
|
5b817fed20 | ||
|
|
b6b523b1f8 | ||
|
|
8c016b94ef | ||
|
|
9c87498045 | ||
|
|
cbb48fa888 | ||
|
|
58ecfbe112 | ||
|
|
93e24a6f25 | ||
|
|
d8dfe6fd7c | ||
|
|
4551ddad08 | ||
|
|
e47533f03c | ||
|
|
5c9f792780 | ||
|
|
bde074bd7c | ||
|
|
5d143f6dec | ||
|
|
8abdcd6d33 | ||
|
|
210f618dc9 | ||
|
|
0514220390 | ||
|
|
2135293799 | ||
|
|
14e3d8fdf5 | ||
|
|
db4fb84160 | ||
|
|
6b0541646f | ||
|
|
72f826a57c | ||
|
|
04b0816e72 | ||
|
|
09980fc895 | ||
|
|
c737256349 | ||
|
|
ff4900da4d | ||
|
|
570f1b1213 | ||
|
|
1f8714bb57 | ||
|
|
08e964986b | ||
|
|
2dcf954101 | ||
|
|
d3d25290fd | ||
|
|
b9939057a0 | ||
|
|
26624faf98 | ||
|
|
23997922ed | ||
|
|
b2120c59e3 | ||
|
|
c04d6eca01 | ||
|
|
5d18b5953a | ||
|
|
5345394d14 | ||
|
|
0c765272df | ||
|
|
f17d4af664 | ||
|
|
f57db1cd74 | ||
|
|
188cac252f | ||
|
|
8fd8f6237e | ||
|
|
6abf50b009 | ||
|
|
8a750b5824 | ||
|
|
1fd45ccd75 | ||
|
|
1fdb3f65df | ||
|
|
a6fe3b095c | ||
|
|
86c0c4d391 | ||
|
|
b42dfe9be2 | ||
|
|
ea66d98df8 | ||
|
|
2cc0d6b3c2 | ||
|
|
8e2006fa2c | ||
|
|
e8c387e85c | ||
|
|
7a82b73b96 | ||
|
|
4049a429d6 | ||
|
|
5895c12c6b | ||
|
|
0b6112408f | ||
|
|
8ee3852ad8 |
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.7.10"
|
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,7 +27,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()
|
||||||
@@ -40,7 +42,7 @@ allprojects {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("com.willfp:eco:6.55.0")
|
compileOnly("com.willfp:eco:6.55.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:2.1.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
@@ -52,11 +54,12 @@ allprojects {
|
|||||||
shadowJar {
|
shadowJar {
|
||||||
relocate("com.willfp.libreforge.loader", "com.willfp.ecopets.libreforge.loader")
|
relocate("com.willfp.libreforge.loader", "com.willfp.ecopets.libreforge.loader")
|
||||||
relocate("com.willfp.ecomponent", "com.willfp.ecopets.ecomponent")
|
relocate("com.willfp.ecomponent", "com.willfp.ecopets.ecomponent")
|
||||||
|
relocate("com.willfp.modelenginebridge", "com.willfp.ecopets.modelenginebridge")
|
||||||
}
|
}
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
kotlinOptions {
|
compilerOptions {
|
||||||
jvmTarget = "17"
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ 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.ticxo.modelengine:api:R3.1.8")
|
|
||||||
compileOnly("com.github.ben-manes.caffeine:caffeine:3.0.2")
|
compileOnly("com.github.ben-manes.caffeine:caffeine:3.0.2")
|
||||||
|
|
||||||
implementation("com.willfp:ecomponent:1.3.0")
|
implementation("com.willfp:ecomponent:1.3.0")
|
||||||
|
implementation("com.willfp:ModelEngineBridge:1.2.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ class Pet(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val entityTexture = config.getString("entity-texture")
|
val entityTexture = config.getString("entity-texture")
|
||||||
val modelEngineAnimation = config.getStringOrNull("modelengine-animation")
|
|
||||||
|
|
||||||
private val levelXpRequirements = listOf(0) + config.getInts("level-xp-requirements")
|
private val levelXpRequirements = listOf(0) + config.getInts("level-xp-requirements")
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.willfp.ecopets.pets.entity
|
package com.willfp.ecopets.pets.entity
|
||||||
|
|
||||||
import com.ticxo.modelengine.api.ModelEngineAPI
|
|
||||||
import com.willfp.ecopets.EcoPetsPlugin
|
import com.willfp.ecopets.EcoPetsPlugin
|
||||||
import com.willfp.ecopets.pets.Pet
|
import com.willfp.ecopets.pets.Pet
|
||||||
|
import com.willfp.modelenginebridge.ModelEngineBridge
|
||||||
import org.bukkit.Location
|
import org.bukkit.Location
|
||||||
import org.bukkit.entity.ArmorStand
|
import org.bukkit.entity.ArmorStand
|
||||||
|
|
||||||
@@ -13,29 +13,11 @@ class ModelEnginePetEntity(
|
|||||||
) : PetEntity(pet) {
|
) : PetEntity(pet) {
|
||||||
override fun spawn(location: Location): ArmorStand {
|
override fun spawn(location: Location): ArmorStand {
|
||||||
val stand = emptyArmorStandAt(location, pet)
|
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 modelled = ModelEngineBridge.instance.createModeledEntity(stand)
|
||||||
val animationHandler = model.animationHandler
|
modelled.addModel(model)
|
||||||
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)
|
|
||||||
|
|
||||||
return stand
|
return stand
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,83 +0,0 @@
|
|||||||
name: ${pluginName}
|
|
||||||
version: ${version}
|
|
||||||
main: com.willfp.ecopets.EcoPetsPlugin
|
|
||||||
api-version: 1.19
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
- name: eco
|
|
||||||
required: true
|
|
||||||
bootstrap: false
|
|
||||||
|
|
||||||
- name: libreforge
|
|
||||||
required: false
|
|
||||||
bootstrap: false
|
|
||||||
|
|
||||||
load-after:
|
|
||||||
- name: eco
|
|
||||||
bootstrap: false
|
|
||||||
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
ecopets.*:
|
|
||||||
description: All ecopets permissions
|
|
||||||
default: op
|
|
||||||
children:
|
|
||||||
ecopets.command.*: true
|
|
||||||
ecopets.command.*:
|
|
||||||
description: All commands
|
|
||||||
default: op
|
|
||||||
children:
|
|
||||||
ecopets.command.ecopets: true
|
|
||||||
ecopets.command.reload: true
|
|
||||||
ecopets.command.pets: true
|
|
||||||
ecopets.command.give: true
|
|
||||||
ecopets.command.giveegg: true
|
|
||||||
ecopets.command.givexp: true
|
|
||||||
ecopets.command.givecurrentxp: true
|
|
||||||
ecopets.command.reset: true
|
|
||||||
ecopets.command.activate: true
|
|
||||||
ecopets.command.deactivate: true
|
|
||||||
|
|
||||||
ecopets.command.reload:
|
|
||||||
description: Allows reloading the config
|
|
||||||
default: op
|
|
||||||
ecopets.command.ecopets:
|
|
||||||
description: Allows the use of /ecopets.
|
|
||||||
default: true
|
|
||||||
ecopets.command.pets:
|
|
||||||
description: Allows the use of /pets.
|
|
||||||
default: true
|
|
||||||
ecopets.command.give:
|
|
||||||
description: Allows the use of /ecopets give.
|
|
||||||
default: op
|
|
||||||
ecopets.command.giveegg:
|
|
||||||
description: Allows the use of /ecopets giveegg.
|
|
||||||
default: op
|
|
||||||
ecopets.command.givexp:
|
|
||||||
description: Allows the use of /ecopets givexp.
|
|
||||||
default: op
|
|
||||||
ecopets.command.givecurrentxp:
|
|
||||||
description: Allows the use of /ecopets givecurrentxp.
|
|
||||||
default: op
|
|
||||||
ecopets.command.reset:
|
|
||||||
description: Allows the use of /ecopets reset.
|
|
||||||
default: op
|
|
||||||
ecopets.command.activate:
|
|
||||||
description: Allows the use of /pets activate.
|
|
||||||
default: true
|
|
||||||
ecopets.command.deactivate:
|
|
||||||
description: Allows the use of /pets deactivate.
|
|
||||||
default: true
|
|
||||||
|
|
||||||
ecopets.xpmultiplier.50percent:
|
|
||||||
description: Gives the player 50% more skill experience
|
|
||||||
default: false
|
|
||||||
ecopets.xpmultiplier.double:
|
|
||||||
description: Gives the player 2x skill experience
|
|
||||||
default: false
|
|
||||||
ecopets.xpmultiplier.triple:
|
|
||||||
description: Gives the player 3x skill experience
|
|
||||||
default: false
|
|
||||||
ecopets.xpmultiplier.quadruple:
|
|
||||||
description: Gives the player 4x skill experience
|
|
||||||
default: false
|
|
||||||
@@ -116,7 +116,6 @@ conditions: [ ]
|
|||||||
# The texture of the pet entity in game
|
# The texture of the pet entity in game
|
||||||
# If you're using modelengine, use modelengine:id as the texture
|
# If you're using modelengine, use modelengine:id as the texture
|
||||||
entity-texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTA5NWZjYzFlM2Q3Y2JkMzUwZjE5YjM4OTQ5OGFiOGJiOTZjNjVhZDE4NWQzNDU5MjA2N2E3ZDAzM2FjNDhkZSJ9fX0="
|
entity-texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTA5NWZjYzFlM2Q3Y2JkMzUwZjE5YjM4OTQ5OGFiOGJiOTZjNjVhZDE4NWQzNDU5MjA2N2E3ZDAzM2FjNDhkZSJ9fX0="
|
||||||
modelengine-animation: "fly" # If you're using ModelEngine, you can specify an animation here
|
|
||||||
|
|
||||||
# The icon in GUIs
|
# The icon in GUIs
|
||||||
icon: player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTA5NWZjYzFlM2Q3Y2JkMzUwZjE5YjM4OTQ5OGFiOGJiOTZjNjVhZDE4NWQzNDU5MjA2N2E3ZDAzM2FjNDhkZSJ9fX0=
|
icon: player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTA5NWZjYzFlM2Q3Y2JkMzUwZjE5YjM4OTQ5OGFiOGJiOTZjNjVhZDE4NWQzNDU5MjA2N2E3ZDAzM2FjNDhkZSJ9fX0=
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#libreforge-updater
|
#libreforge-updater
|
||||||
#Tue Nov 21 22:41:48 GMT 2023
|
#Sat Mar 29 14:22:31 GMT 2025
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
libreforge-version=4.44.0
|
libreforge-version=4.75.0
|
||||||
version=2.44.0
|
version=2.74.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
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
jdk: openjdk17
|
|
||||||
before_install:
|
|
||||||
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
|
||||||
- sdk update
|
|
||||||
- sdk install java 17.0.1-tem
|
|
||||||
- sdk use java 17.0.1-tem
|
|
||||||
@@ -2,11 +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/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
|
||||||
|
}
|
||||||
|
|
||||||
rootProject.name = "EcoPets"
|
rootProject.name = "EcoPets"
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
|
|||||||
Reference in New Issue
Block a user