Page 1 of 1

Grappling Hook!

Posted: November 26th, 2019, 7:06 am
by Xeane
This is a simple script for a Zelda-styled hookshot. "Grappling Hook" sounded a more apppropriate name for Minecraft, however.
give it to yourself with `/ex give grappling_hook`, or use it anywhere in your own scripts!


Script: https://one.denizenscript.com/haste/62348

Re: Grappling Hook!

Posted: November 26th, 2019, 7:26 am
by mcmonkey
".size> == 0:" -> there's an is_empty tag you can use instead of that :D

Also that queue-passing-around seems a bit hackish. Don't offhand have a suggestion to replace it but... that's probably not the ideal way.

.shot_entities.get[1].as_entity.location> you shouldn't need that "as_entity" there... if it is somehow required, report it as a bug. That'd be a bug. Pretty sure it shouldn't be required.

the grappling_hook_pull "if a" + "else if b" + "else" should just be "if a || !b" + "else" (since the code in the first and last block is duplicated).

Re: Grappling Hook!

Posted: November 26th, 2019, 9:11 am
by Xeane
Taken the above advice, and updated the script accordingly.