Skip to content

Commit

Permalink
chore: bump idofront
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Jan 31, 2024
1 parent e339ece commit 2a75fdb
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 58 deletions.
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ plugins {
alias(libs.plugins.mia.publication)
alias(libs.plugins.mia.copyjar)
alias(libs.plugins.kotlinx.serialization)
alias(libs.plugins.mia.nms)
}

repositories {
mavenCentral()
maven("https://repo.mineinabyss.com/releases")
maven("https://repo.mineinabyss.com/mirror")
maven("https://mvn.lumine.io/service/rest/repository/browse/maven-public/")
}

dependencies {

// From Geary
compileOnly(libs.kotlin.stdlib)
compileOnly(libs.kotlinx.serialization.kaml)
compileOnly(libs.bundles.idofront.core)
compileOnly(libs.idofront.nms)
compileOnly(libs.minecraft.plugin.modelengine)

implementation(libs.bundles.idofront.core)
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kotlin.code.style=official
group=com.mineinabyss
version=1.10
idofrontVersion=0.19.14
version=1.11
idofrontVersion=0.21.6
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from("com.mineinabyss:catalog:$idofrontVersion")
version("modelengine", "R4.0.4")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ data class BoneHurtConfig(
val waterfallDamageMultiplier: Double = 0.5,
val waterfallMoveMultiplier: Double = 0.15,
val bubbleColumnDamageMultiplier: Double = 2.0,
val bubbleColumnBreathMultiplier: Int = 5,
val bubbleColumnBreathMultiplier: Int = 2,
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.cultofclang.bonehurtingjuice

import com.mineinabyss.idofront.di.DI
import com.mineinabyss.idofront.platforms.Platforms
import com.mineinabyss.idofront.plugin.Plugins
import com.mineinabyss.idofront.plugin.listeners
import com.ticxo.modelengine.api.ModelEngineAPI
Expand All @@ -12,10 +11,6 @@ import org.cultofclang.bonehurtingjuice.modules.BoneHurtDefaultModule
import org.cultofclang.bonehurtingjuice.modules.BoneHurtModule

class BoneHurtPlugin : JavaPlugin() {
override fun onLoad() {
Platforms.load(this, "mineinabyss")
}

override fun onEnable() {
DI.add<BoneHurtModule>(BoneHurtDefaultModule(this))
listeners(MoveListener)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class ModelEngineListener : Listener {
if (from.block.isLiquid) return
val mount = entity.getMountManager() ?: return

if (mount.driver != null && mount.driver is Player) {
val driver = mount.driver as Player
(mount.driver as? Player)?.let { driver ->
driver.fallDistance = entity.fallDistance
driver.hurtBones(entity.fallDistance)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ package org.cultofclang.bonehurtingjuice.listeners
import io.papermc.paper.event.entity.EntityInsideBlockEvent
import io.papermc.paper.event.entity.EntityMoveEvent
import org.bukkit.GameMode
import org.bukkit.Material
import org.bukkit.Particle
import org.bukkit.Tag
import org.bukkit.block.BlockFace
import org.bukkit.block.data.type.Bed
import org.bukkit.entity.Player
import org.bukkit.event.EventHandler
Expand All @@ -32,7 +29,8 @@ internal object MoveListener : Listener {

@EventHandler
fun EntityInsideBlockEvent.cancelHoneyAndWeb() {
if (block.type == Material.HONEY_BLOCK || block.type == Material.COBWEB) isCancelled = true
// Primarily for HONEY_BLOCK and COBWEB
if (block.type in bones.config.hurtBlocks) isCancelled = true
}

@EventHandler
Expand Down Expand Up @@ -64,7 +62,6 @@ internal object MoveListener : Listener {
fun PlayerTeleportEvent.playerTeleport() {
if (player.gameMode == GameMode.CREATIVE) return
if (this.cause != PlayerTeleportEvent.TeleportCause.ENDER_PEARL && this.cause != PlayerTeleportEvent.TeleportCause.CHORUS_FRUIT) return
if (this.isCancelled) return //Cancels the falldamage if another plugin cancels the event.

val teleportDistance = player.location.y - to.toBlockLocation().y
if (teleportDistance <= 0) return
Expand Down
32 changes: 0 additions & 32 deletions src/main/resources/config.yml

This file was deleted.

7 changes: 1 addition & 6 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
name: BoneHurtingJuice
version: ${plugin_version}
main: org.cultofclang.bonehurtingjuice.BoneHurtPlugin
api-version: 1.17
depend: [Geary]
api-version: "1.20"
softdepend: [ModelEngine]
commands:
bonehurt:
description: Why are my bones hurting?
usage: /bonehurt

0 comments on commit 2a75fdb

Please sign in to comment.