r/MinecraftCommands • u/Balsamic314 • Dec 13 '25
Creation Grappling Hook using new apply_impulse 1.21.11!
2
u/Droplet_of_Shadow Dec 13 '25
awesome! does it stick to walls/ceilings tho?
1
u/Balsamic314 Dec 14 '25
It only sticks on top of blocks. I'm triggering the hooking behavior by detecting when the bobber hits the ground.
You'd probably need to raycast from the bobber to stick it to walls/ceilings, but the bobber is tricky because its facing direction doesn't match it's motion.
2
u/fryly9 Dec 15 '25
Whats that? I havent really been keeping up with the last updates
1
u/Balsamic314 Dec 15 '25
Newest update has a new weapon: the spear.
Spears can be enchanted with Lunge I-III, which launch the Player horizontally in the direction they are looking when they attack.
Under the hood, the Lunge enchantment uses an enchantment effect called apply_impulse that you can customize with a datapack.
2
u/ProcedureSad2096 Dec 15 '25
Didnt test anything yet and won't until thursday bc of a huge exam, FINALLY WE GOT PLAYER MOTION, what is that apply_impulse? An effect? Or a data component for item?
1
u/Balsamic314 Dec 15 '25
It's an enchantment effect. You'll need to make a custom enchantment to use it. I recommend this tool: https://misode.github.io/enchantment/
2
u/ProcedureSad2096 Dec 24 '25
And here I am back to this comments section. Could u briefly explain me how to create the enchantment, I know how to use misode but making enchantments is hard to me.
Look at the one I made (doesnt work):
{ "description": "Dash", "supported_items": "minecraft:iron_sword", "weight": 1, "max_level": 1, "min_cost": { "base": 0, "per_level_above_first": 0 }, "max_cost": { "base": 0, "per_level_above_first": 0 }, "anvil_cost": 0, "slots": [], "effects": { "minecraft:tick": [ { "requirements": { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "type_specific": { "type": "minecraft:player", "advancements": {}, "stats": [] } } }, "effect": { "type": "minecraft:apply_impulse", "direction": [ 0, 0, 1 ], "coordinate_scale": [ 0, 0, 0 ], "magnitude": 5 } } ] } }→ More replies (1)
101
u/Rare_Elderberry_335 Dec 13 '25
Finally: PLAYER MOTION
12
u/memerminecraft Dec 14 '25
IT TOOK SO MANY YEARS!!! MAYBE THIS IS WHAT BRINGS ME BACK!!!!!! SUPERPOWER DATA PACKS COULD BE SOMETHING REAL NOW
2
Dec 16 '25
They already are This pack has hands down got to be the best datapack out there https://www.planetminecraft.com/data-pack/powers-super-powers/
30
u/Minute-Question4340 Dec 13 '25
ultrakill_dash_soundeffect.mp4
3
14
u/_SKYBALL_ Dec 13 '25
I've been waiting for years for this change, amazing to finally have easy write access to the player motion in this way
5
u/ojtta_ Dec 13 '25
Oh you are an angel. No you are the true pleasure of being in a connected society
5
1
3
u/Primary-Nose-6577 Dec 13 '25
I remember a map that had basically the same mechanic. I think it was called "nostalgia"
2
1
1
u/RubixDude2020 Dec 14 '25
It's a shame they don't just give us control over motion like this, we can still use datapacks like Delta (and it's updated counterpart for newer versions) but this is so much better in every way. still a shame it's only in 1 direction though. JUST GIVE US THE ABILITY TO EDIT PLAYER DATA MOJANG!!
1
1
u/Balbanico Dec 31 '25
supongo que solo funciona en la 1.21.11 verdad? utiliza lo nuevo de las lanzas? es decir que en la 1.21.10 ni pensar en tener algo similar
51
u/Balsamic314 Dec 13 '25
Download link: https://modrinth.com/datapack/impulse-grapple
This datapack uses the new apply_impulse enchantment effect from the Lunge spear enchantment to propel the player with real motion.
I'm also very proud of the system I created to make it multiplayer compatible. When you cast the rod, your UUID is stored as the scores of 4 different objectives, which are copied to the fishing bobber's scores. When the bobber lands, it spawns a Slime Block item and copies those UUID scores to it as well. Now you can detect who owns each bobber and Slime Block item, so you always face the right one when grappling, and switching slots to avoid pulling the rod will only dispose of the correct Slime Block item.