From e6c35c5b1eaa017ded00493849d526dbebcc7c65 Mon Sep 17 00:00:00 2001 From: Kariya Date: Tue, 9 Dec 2025 08:07:34 +0000 Subject: [PATCH] feat: Reduce player vertical velocity after grappling and increase grappling hook projectile speed. --- .../net/hareworks/hcu/items/domain/impl/GrapplingItem.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/net/hareworks/hcu/items/domain/impl/GrapplingItem.kt b/src/main/kotlin/net/hareworks/hcu/items/domain/impl/GrapplingItem.kt index 6f92bfa..7d2522d 100644 --- a/src/main/kotlin/net/hareworks/hcu/items/domain/impl/GrapplingItem.kt +++ b/src/main/kotlin/net/hareworks/hcu/items/domain/impl/GrapplingItem.kt @@ -58,6 +58,8 @@ class GrapplingItem : SpecialItem("grappling_hook") { val speed = 1.0 + (tier.level * 0.4) val velocity = vector.normalize().multiply(speed) + // 垂直方向の速度を抑制(上方向に飛びすぎるのを防ぐ) + velocity.y = velocity.y * 0.5 player.velocity = velocity @@ -110,7 +112,8 @@ class GrapplingItem : SpecialItem("grappling_hook") { val shooter = projectile.shooter if (shooter is org.bukkit.entity.Player) { - projectile.velocity = projectile.velocity.add(shooter.velocity) + // フックの飛行速度を上げる(1.8倍)+ プレイヤーの移動速度を加算 + projectile.velocity = projectile.velocity.multiply(1.8).add(shooter.velocity) shooter.playSound(shooter.location, org.bukkit.Sound.ENTITY_FISHING_BOBBER_THROW, 1.0f, 0.8f) shooter.playSound(shooter.location, org.bukkit.Sound.ENTITY_ARROW_SHOOT, 0.5f, 1.2f)