Currently have an issue with using wind charges to jump in my datapack.
First pass: I gave the player Resistance V and summoned the wind charge beneath them. It worked in creative but movement was clunky in survival because of the hardcoded damage tick.
Second pass: I passed the player's UUID to the wind charge via macro, and now the wind charge won't launch at all.
The goal: To allow players to double jump seamlessly in creative and survival
Functions:
# Double Jump function
# Apply a short internal cooldown so jumps don't rapidly misfire
scoreboard players set @s komodo.items.exo_leggings_jump_cooldown 10
# Reset their FallDistance to 0 so they don't die upon landing
data modify entity @s fall_distance set value 0.0f
# Momentum Tracking: Read X/Z motion, invert it, and store it in the macro object
data modify storage komodo:macro uuid set from entity @s UUID
execute store result storage komodo:macro offset.x double -0.0015 run data get entity @s Motion[0] 1000
execute store result storage komodo:macro offset.z double -0.0015 run data get entity @s Motion[2] 1000
# Fire the Macro Launch Mechanism
function komodo:movement/double_macro with storage komodo:macro offset
# Deduct 1 jump from their available capacity
scoreboard players remove @s komodo.player.jumps_remaining 1
# VFX and Audio
playsound minecraft:entity.breeze.wind_burst player @s ~ ~ ~ 1 1.2
playsound minecraft:item.trident.thunder player @s ~ ~ ~ 0.5 2.0
particle minecraft:electric_spark ~ ~ ~ 0.5 0.5 0.5 0.2 30
particle minecraft:gust_emitter_small ~ ~-0.5 ~ 0 0 0 0 1
[30m# Double jump macro
[37m$[35msummon [0mwind_charge [32m~[34m$[33m([0mx[33m) [32m~-0.1 ~[34m$[33m([0mz[33m) {[37mOwner[34m: $[35m([0muuid[35m)[34m, [37mMotion[34m:[35m[[32m0.0d[34m, [32m2.0d[34m, [32m0.0d[35m][34m, [37macceleration_power[34m: [32m0.1d[33m}