#Wind Charge Not Launching Player

1 messages · Page 1 of 1 (latest)

hexed charmBOT
#

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
# Double jump macro
$summon wind_charge ~$(x) ~-0.1 ~$(z) {Owner: $(uuid), Motion:[0.0d, 2.0d, 0.0d], acceleration_power: 0.1d}
cedar pawn
#

How it's intended to work (recorded in creative mode): https://streamable.com/42nejb

How it currently works (recorded in survival mode): https://streamable.com/vpskor

As stated earlier, the damage tick in survival mode throws the movement off

** The code here is using the first pass: Applying resistance to user without passing the owner's uuid tag to the wind charge**

cedar pawn
#

Figured it out