Compare commits

...

49 Commits

Author SHA1 Message Date
Auxilor
f83d646e02 libreforge-updater 2022-08-23 11:08:06 +02:00
Auxilor
6c4437e0cb libreforge-updater 2022-08-22 12:46:54 +02:00
Auxilor
8b8bc294e4 libreforge-updater 2022-08-20 10:00:27 +02:00
Auxilor
94cc573114 libreforge-updater 2022-08-17 14:22:18 +02:00
Auxilor
4f3da3ae84 libreforge-updater 2022-08-17 12:10:10 +02:00
Auxilor
19b52eaaa7 libreforge-updater 2022-08-16 18:46:26 +02:00
Auxilor
e9f33fd298 libreforge-updater 2022-08-14 17:30:58 +02:00
Auxilor
fc66efff53 Downgraded modelengine 2022-08-13 12:33:20 +02:00
Auxilor
1409620b92 Updated to 1.18.1 2022-08-13 12:01:19 +02:00
Will FP
f1acc877b7 Merge pull request #20 from 0ft3n/patch-1
Fixed default pets yml
2022-08-13 11:59:54 +02:00
Will FP
d7e725822c Merge pull request #21 from Wesley51/master
Fix ModelEngine dependency
2022-08-13 11:59:49 +02:00
Auxilor
d613e569ed libreforge-updater 2022-08-13 11:58:28 +02:00
WesleyTrain
22274a9bdf Update ModelEnginePetEntity.kt 2022-08-11 14:27:17 -04:00
WesleyTrain
2ef337d4ca Update ModelEngine dependency 2022-08-11 14:25:57 -04:00
0ft3n
aacd247c54 Fixed default pets yml (vampire) 2022-08-11 04:16:52 +03:00
Auxilor
1aa419bce7 libreforge-updater 2022-08-05 18:42:13 +01:00
Auxilor
56f948e898 libreforge-updater 2022-08-05 18:40:40 +01:00
Auxilor
d92472c0a4 libreforge-updater 2022-08-04 13:04:16 +01:00
Auxilor
7de03c1459 effects 2022-08-04 12:39:04 +01:00
Auxilor
9109e11791 effects 2022-08-04 12:35:17 +01:00
Auxilor
a0381e113c effects 2022-08-04 12:34:42 +01:00
Auxilor
2d6128eca9 lang 2022-08-04 12:33:58 +01:00
Auxilor
985608791b libreforge-updater 2022-08-04 12:27:13 +01:00
Auxilor
dd65bfa58d libreforge-updater 2022-08-04 12:25:02 +01:00
Auxilor
a61cce53c1 Updated to 1.16.2 2022-08-03 15:09:52 +01:00
Auxilor
e7cc186e9c Jank fix 2022-08-03 15:09:45 +01:00
Auxilor
7fb3df354d libreforge-updater 2022-08-02 16:27:25 +01:00
Auxilor
971c643203 libreforge-updater 2022-08-02 16:22:01 +01:00
Auxilor
b2381c33fe libreforge-updater 2022-08-02 16:17:45 +01:00
Auxilor
0642ff1421 libreforge-updater 2022-08-01 11:19:55 +01:00
Auxilor
7dc5caec57 libreforge-updater 2022-07-29 17:51:31 +01:00
Auxilor
b006ebab53 libreforge-updater 2022-07-27 20:17:58 +01:00
Auxilor
3bd774265d libreforge-updater 2022-07-25 17:54:31 +01:00
Auxilor
0ff6d68a5b libreforge-updater 2022-07-25 17:03:22 +01:00
Auxilor
a27ebb1b5c libreforge-updater 2022-07-24 22:49:45 +01:00
Auxilor
afafd86eaf libreforge-updater 2022-07-24 21:51:44 +01:00
Auxilor
49a2713017 libreforge-updater 2022-07-23 17:43:45 +01:00
Auxilor
a4263e8397 libreforge-updater 2022-07-22 14:21:36 +01:00
Auxilor
17f3aa8862 Updated kotlin 2022-07-22 14:17:51 +01:00
Auxilor
c94024ea19 libreforge-updater 2022-07-21 20:15:00 +01:00
Auxilor
1daa52e1f4 Changed pet display 2022-07-21 16:39:47 +01:00
Auxilor
a06808f802 Updated to 1.11.2 2022-07-21 16:15:23 +01:00
Auxilor
91cf08f0ac Fixed pets obstructing the view when looking up 2022-07-21 16:15:17 +01:00
Auxilor
9a7ff1760c Updated to 1.11.1 2022-07-21 15:50:40 +01:00
Will FP
f2c3f569b7 Merge pull request #10 from Sedri05/master
Fixed Default Pets
2022-07-21 15:25:03 +01:00
Auxilor
508cb3e216 libreforge-updater 2022-07-20 00:11:07 +01:00
Auxilor
5f998f4bad libreforge-updater 2022-07-13 21:23:31 +01:00
Auxilor
e4b468b0da libreforge-updater 2022-07-12 14:59:32 +01:00
Sedri05
0bb4aa6d51 Update pets.yml 2022-07-03 01:30:07 +02:00
5 changed files with 49 additions and 22 deletions

View File

@@ -4,7 +4,7 @@ buildscript {
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
}
}
@@ -48,12 +48,12 @@ allprojects {
dependencies {
compileOnly 'com.willfp:eco:6.37.1'
implementation 'com.willfp:libreforge:3.74.0'
implementation 'com.willfp:libreforge:3.87.0'
implementation 'org.joml:joml:1.10.4'
compileOnly 'org.jetbrains:annotations:23.0.0'
compileOnly 'org.jetbrains.kotlin:kotlin-stdlib:1.6.21'
compileOnly 'org.jetbrains.kotlin:kotlin-stdlib:1.7.10'
}
tasks.withType(JavaCompile) {

View File

@@ -19,7 +19,7 @@ class PetDisplay(
) : Listener {
private var tick = 0
private val trackedEntities = mutableMapOf<UUID, ArmorStand>()
private val trackedEntities = mutableMapOf<UUID, PetArmorStand>()
fun tickAll() {
for (player in Bukkit.getOnlinePlayers()) {
@@ -44,7 +44,11 @@ class PetDisplay(
location.y += NumberUtils.fastSin(tick / (2 * PI) * 0.5) * 0.15
stand.teleport(location)
try {
stand.teleport(location)
} catch (_: Exception) {
}
if (!pet.entityTexture.contains(":")) {
stand.setRotation((20 * tick / (2 * PI)).toFloat(), 0f)
@@ -55,15 +59,30 @@ class PetDisplay(
private fun getLocation(player: Player): Location {
val offset = player.eyeLocation.direction.clone().normalize()
.multiply(-1)
.apply { y = abs(y) }
.apply {
y = abs(y)
if (abs(x) < 0.5) {
x = 0.5
}
if (abs(z) < 0.5) {
z = 0.5
}
}
.rotateAroundY(PI / 6)
return player.eyeLocation.clone().add(offset)
}
private fun getOrNew(player: Player): ArmorStand? {
val existing = trackedEntities[player.uniqueId]
val tracked = trackedEntities[player.uniqueId]
val existing = tracked?.stand
val pet = player.activePet
if (pet != tracked?.pet) {
tracked?.stand?.remove()
}
if (existing == null || existing.isDead || pet == null) {
existing?.remove()
@@ -76,15 +95,15 @@ class PetDisplay(
val location = getLocation(player)
val stand = pet.makePetEntity().spawn(location)
trackedEntities[player.uniqueId] = stand
trackedEntities[player.uniqueId] = PetArmorStand(stand, pet)
}
return trackedEntities[player.uniqueId]
return trackedEntities[player.uniqueId]?.stand
}
fun shutdown() {
for (stand in trackedEntities.values) {
stand.remove()
stand.stand.remove()
}
trackedEntities.clear()
@@ -92,7 +111,12 @@ class PetDisplay(
@EventHandler
fun onLeave(event: PlayerQuitEvent) {
trackedEntities[event.player.uniqueId]?.remove()
trackedEntities[event.player.uniqueId]?.stand?.remove()
trackedEntities.remove(event.player.uniqueId)
}
private data class PetArmorStand(
val stand: ArmorStand,
val pet: Pet
)
}

View File

@@ -16,6 +16,9 @@ class ModelEnginePetEntity(
val modelled = ModelEngineAPI.createModeledEntity(stand)
modelled.addActiveModel(model)
// ModelEngine removed addActiveModel in new API release... for no reason.
//modelled.addModel(model,true)
return stand
}
}

View File

@@ -721,45 +721,45 @@ pets:
1:
- "&8» &#ff0000This pet can ONLY be levelled at night."
- ""
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance% &7to gain"
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance%% &7to gain"
- " &7health from your enemy. Has a &#ff0000%lifesteal_cooldown% &7second cooldown."
25:
- "&8» &#ff0000This pet can ONLY be levelled at night."
- ""
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance% &7to gain"
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance%% &7to gain"
- " &7health from your enemy. Has a &#ff0000%lifesteal_cooldown% &7second cooldown."
- ""
- "&8» &7When hitting enemies have a &#ff0000%bleed_chance% &7to bleed"
- "&8» &7When hitting enemies have a &#ff0000%bleed_chance%% &7to bleed"
- " &7your enemies dealing &#ff0000%bleed_damage%&7 damage twice."
rewards-description:
1:
- "&8» &#ff0000This pet can ONLY be levelled at night."
- ""
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance% &7to gain &ff0000%lifesteal_heal%"
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance%% &7to gain &ff0000%lifesteal_heal%"
- " &7health from your enemy. Has a &#ff0000%lifesteal_cooldown% &7second cooldown."
25:
- "&8» &#ff0000This pet can ONLY be levelled at night."
- ""
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance% &7to gain"
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance%% &7to gain"
- " &7health from your enemy. Has a &#ff0000%lifesteal_cooldown% &7second cooldown."
- ""
- "&8» &7When hitting enemies have a &#ff0000%bleed_chance% &7to bleed"
- "&8» &7When hitting enemies have a &#ff0000%bleed_chance%% &7to bleed"
- " &7your enemies dealing &#ff0000%bleed_damage%&7 damage twice."
level-up-messages:
1:
- "&8» &#ff0000This pet can ONLY be levelled at night."
- ""
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance% &7to gain"
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance%% &7to gain"
- " &7health from your enemy. Has a &#ff0000%lifesteal_cooldown% &7second cooldown."
25:
- "&8» &#ff0000This pet can ONLY be levelled at night."
- ""
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance% &7to gain"
- "&8» &7When hitting enemies have a &#ff0000%lifesteal_chance%% &7to gain"
- " &7health from your enemy. Has a &#ff0000%lifesteal_cooldown% &7second cooldown."
- ""
- "&8» &7When hitting enemies have a &#ff0000%bleed_chance% &7to bleed"
- "&8» &7When hitting enemies have a &#ff0000%bleed_chance%% &7to bleed"
- " &7your enemies dealing &#ff0000%bleed_damage%&7 damage twice."
level-commands: [ ]

View File

@@ -1,4 +1,4 @@
#libreforge-updater
#Mon Jul 11 16:17:10 BST 2022
version=1.10.0
#Tue Aug 23 11:08:06 CEST 2022
version=1.23.0
plugin-name=EcoPets