Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions gm4_metallurgy/data/gm4_vibro_shamir/function/jump.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +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
Loading