grappling_hook: type: item debug: false material: tripwire_hook display name: <&a><&l><&n>Grappling Hook lore: - "<&b><&l>Use this to grapple a block" - "<&b><&l>and pull yourself to it." grappling_hook_events: type: world debug: false events: on player right clicks with grappling_hook: - if : - narrate "<&c>You can only fire one grappling hook at a time." - stop - shoot arrow speed:3 script:grappling_hook_pull save:hook - flag player grappling:true duration:10s - repeat 999: - if ! || !: - stop - playeffect redstone at:].distance[0.5]> quantity:5 special_data:1|gray offset:0.1 - wait 2t grappling_hook_pull: type: task debug: false script: - if <[location].find.blocks.within[2].filter[material.name.is[!=].to[air]].is_empty> || !]>: - narrate "<&c>Unable to grapple to this location from here." - flag player grappling:! - else: - push d:<[location]> script:grappling_hook_sanity def:<[location]> grappling_hook_sanity: type: task debug: false definitions: loc script: - flag player grappling:! - teleport <[loc].with_pitch[].with_yaw[]>