Skip to content

Commit

Permalink
chore: Bump idofront, geary, publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Mar 16, 2024
1 parent 9f47e67 commit fb53558
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 43 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: MineInAbyss/publish-action@master
- uses: MineInAbyss/publish-action@develop
with:
maven-metadata-url: https://repo.mineinabyss.com/releases/com/mineinabyss/bonfire/maven-metadata.xml
maven-snapshot-metadata-url: https://repo.mineinabyss.com/snapshots/com/mineinabyss/bonfire/maven-metadata.xml
maven-username: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
maven-password: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
release-files: |
Expand Down
34 changes: 17 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.mia.kotlin.jvm)
alias(libs.plugins.kotlinx.serialization)
alias(libs.plugins.mia.papermc)
alias(libs.plugins.mia.copyjar)
alias(libs.plugins.mia.nms)
alias(libs.plugins.mia.publication)
alias(libs.plugins.mia.autoversion)
alias(idofrontLibs.plugins.mia.kotlin.jvm)
alias(idofrontLibs.plugins.kotlinx.serialization)
alias(idofrontLibs.plugins.mia.papermc)
alias(idofrontLibs.plugins.mia.copyjar)
alias(idofrontLibs.plugins.mia.nms)
alias(idofrontLibs.plugins.mia.publication)
alias(idofrontLibs.plugins.mia.autoversion)
}

repositories {
Expand All @@ -18,18 +18,18 @@ repositories {

dependencies {
// MineInAbyss platform
compileOnly(libs.bundles.idofront.core)
compileOnly(libs.idofront.nms)
compileOnly(libs.kotlinx.serialization.json)
compileOnly(libs.kotlinx.serialization.kaml)
compileOnly(libs.kotlinx.serialization.cbor)
compileOnly(libs.minecraft.mccoroutine)
compileOnly(idofrontLibs.bundles.idofront.core)
compileOnly(idofrontLibs.idofront.nms)
compileOnly(idofrontLibs.kotlinx.serialization.json)
compileOnly(idofrontLibs.kotlinx.serialization.kaml)
compileOnly(idofrontLibs.kotlinx.serialization.cbor)
compileOnly(idofrontLibs.minecraft.mccoroutine)

// Geary platform
compileOnly(bfLibs.geary.papermc)
compileOnly(libs.geary.papermc)

// Other plugins
compileOnly(bfLibs.blocky)
compileOnly(libs.minecraft.plugin.protocollib)
compileOnly(bfLibs.protocolburrito)
compileOnly(libs.blocky)
compileOnly(idofrontLibs.minecraft.plugin.protocollib)
compileOnly(libs.protocolburrito)
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=com.mineinabyss
version=1.10
idofrontVersion=0.21.6
idofrontVersion=0.23.0
6 changes: 3 additions & 3 deletions gradle/bfLibs.versions.toml → gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
gearyPaper = "0.29-SNAPSHOT"
blocky = "0.9.4"
protocolburrito = "0.9.0"
gearyPaper = "0.30.0"
blocky = "0.9.13-dev.1"
protocolburrito = "0.10.0-dev.0"

[libraries]
geary-papermc = { module = "com.mineinabyss:geary-papermc", version.ref = "gearyPaper" }
Expand Down
5 changes: 3 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ dependencyResolutionManagement {
}

versionCatalogs {
create("libs").from("com.mineinabyss:catalog:$idofrontVersion")
create("bfLibs").from(files("gradle/bfLibs.versions.toml"))
create("idofrontLibs") {
from("com.mineinabyss:catalog:$idofrontVersion")
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,29 @@ import com.mineinabyss.bonfire.bonfire
import com.mineinabyss.bonfire.components.BonfireEffectArea
import com.mineinabyss.bonfire.extensions.isBonfire
import com.mineinabyss.geary.autoscan.AutoScan
import com.mineinabyss.geary.systems.RepeatingSystem
import com.mineinabyss.geary.systems.accessors.Pointer
import com.mineinabyss.geary.modules.GearyModule
import com.mineinabyss.geary.systems.builders.system
import com.mineinabyss.geary.systems.query.Query
import com.mineinabyss.idofront.time.ticks
import org.bukkit.Particle
import org.bukkit.entity.ItemDisplay
import org.bukkit.entity.Player

@AutoScan
class BonfireEffectSystem : RepeatingSystem(10.ticks) {
private val Pointer.player by get<Player>()
private val Pointer.effect by get<BonfireEffectArea>()
fun GearyModule.bonfireEffectSystem() = system(object : Query() {
val player by get<Player>()
val effect by get<BonfireEffectArea>()
}).every(10.ticks).exec {
// Check if still near a bonfire
player.location.getNearbyEntitiesByType(ItemDisplay::class.java, bonfire.config.effectRadius).firstOrNull {
it.isBonfire && it.uniqueId == effect.uuid
}?.let {
player.location.world.spawnParticle(
listOf(Particle.SOUL, Particle.SOUL_FIRE_FLAME).random(),
player.location, 1, 0.5, 1.0, 0.5, 0.0
)

override fun Pointer.tick() {
// Check if still near a bonfire
player.location.getNearbyEntitiesByType(ItemDisplay::class.java, bonfire.config.effectRadius).firstOrNull {
it.isBonfire && it.uniqueId == effect.uuid
}?.let {
player.location.world.spawnParticle(
listOf(Particle.SOUL, Particle.SOUL_FIRE_FLAME).random(),
player.location, 1, 0.5, 1.0, 0.5, 0.0
)

player.saturation = bonfire.config.effectStrength
player.saturatedRegenRate = bonfire.config.effectRegenRate
}
player.saturation = bonfire.config.effectStrength
player.saturatedRegenRate = bonfire.config.effectRegenRate
}
}

0 comments on commit fb53558

Please sign in to comment.