From 54cf097e8dc197ebe56281ceaa6d274f7ab4f613 Mon Sep 17 00:00:00 2001 From: Thanathor <73304324+TheThanathor@users.noreply.github.com> Date: Fri, 14 Nov 2025 15:48:05 +0100 Subject: [PATCH 1/2] let vibro use attributes note: this does not apply the safe fall distance from jump boost effect, but that is normally gone on landing anyway --- .../data/gm4_metallurgy/function/tick.mcfunction | 2 +- .../data/gm4_vibro_shamir/function/jump.mcfunction | 14 ++++++++++---- .../function/remove_jump.mcfunction | 3 +++ 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction diff --git a/gm4_metallurgy/data/gm4_metallurgy/function/tick.mcfunction b/gm4_metallurgy/data/gm4_metallurgy/function/tick.mcfunction index f9413a5aa3..d88c3fed6e 100644 --- a/gm4_metallurgy/data/gm4_metallurgy/function/tick.mcfunction +++ b/gm4_metallurgy/data/gm4_metallurgy/function/tick.mcfunction @@ -14,7 +14,7 @@ execute if score $hypexperia_active gm4_ml_data matches 1 run function gm4_hypex # vibro execute as @a[gamemode=!spectator,tag=gm4_has_vibro,predicate=gm4_vibro_shamir:sneak_on_ground] at @s run function gm4_vibro_shamir:jump -scoreboard players reset @a[gamemode=!spectator,tag=gm4_has_vibro,predicate=!gm4_vibro_shamir:sneak_on_ground] gm4_vibro_sneak +execute as @a[gamemode=!spectator,scores={gm4_vibro_sneak=1..},predicate=!gm4_vibro_shamir:sneak_on_ground] run function gm4_vibro_shamir:remove_jump scoreboard players reset @a gm4_vibro_fall scoreboard players reset @a gm4_vibro_hurt scoreboard players reset @a gm4_vibro_absorb diff --git a/gm4_metallurgy/data/gm4_vibro_shamir/function/jump.mcfunction b/gm4_metallurgy/data/gm4_vibro_shamir/function/jump.mcfunction index ee45c12392..29d115abd5 100644 --- a/gm4_metallurgy/data/gm4_vibro_shamir/function/jump.mcfunction +++ b/gm4_metallurgy/data/gm4_vibro_shamir/function/jump.mcfunction @@ -5,10 +5,16 @@ scoreboard players add @s gm4_vibro_sneak 1 # apply jump boost based on sneak number -effect give @s[scores={gm4_vibro_sneak=1..5}] jump_boost 1 3 false -effect give @s[scores={gm4_vibro_sneak=6..10}] jump_boost 1 5 false -effect give @s[scores={gm4_vibro_sneak=11..15}] jump_boost 1 6 false -effect give @s[scores={gm4_vibro_sneak=16..}] jump_boost 1 9 false +attribute @s[scores={gm4_vibro_sneak=1}] jump_strength modifier add gm4_vibro_shamir:jump_boost 0.4 add_value + +attribute @s[scores={gm4_vibro_sneak=6}] jump_strength modifier remove gm4_vibro_shamir:jump_boost +attribute @s[scores={gm4_vibro_sneak=6}] jump_strength modifier add gm4_vibro_shamir:jump_boost 0.6 add_value + +attribute @s[scores={gm4_vibro_sneak=11}] jump_strength modifier remove gm4_vibro_shamir:jump_boost +attribute @s[scores={gm4_vibro_sneak=11}] jump_strength modifier add gm4_vibro_shamir:jump_boost 0.7 add_value + +attribute @s[scores={gm4_vibro_sneak=16}] jump_strength modifier remove gm4_vibro_shamir:jump_boost +attribute @s[scores={gm4_vibro_sneak=16}] jump_strength modifier add gm4_vibro_shamir:jump_boost 1.0 add_value # playsound (A Major Scale) execute if score @s gm4_vibro_sneak matches 1 run playsound minecraft:block.stone.step block @a[distance=..8] ~ ~ ~ 0.6 1.189207 diff --git a/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction b/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction new file mode 100644 index 0000000000..febfacd044 --- /dev/null +++ b/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction @@ -0,0 +1,3 @@ + +scoreboard players reset @s gm4_vibro_sneak +attribute @s jump_strength modifier remove gm4_vibro_shamir:jump_boost From a3d2623330cfd1f04f91c6261cfc8fc20580b489 Mon Sep 17 00:00:00 2001 From: Thanathor <73304324+TheThanathor@users.noreply.github.com> Date: Fri, 14 Nov 2025 19:39:28 +0100 Subject: [PATCH 2/2] add function header --- .../data/gm4_vibro_shamir/function/remove_jump.mcfunction | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction b/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction index febfacd044..5c74037aca 100644 --- a/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction +++ b/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction @@ -1,3 +1,5 @@ +# @s = vibro player no longer sneaking on the ground +# run from gm4_metallurgy:tick scoreboard players reset @s gm4_vibro_sneak attribute @s jump_strength modifier remove gm4_vibro_shamir:jump_boost