I made a grappling hook in Minecraft and put it into a structure. However, I want to use it in a multiplayer map where multiple people may be using it at one time. I believe the way it is currently only works with one player at a time. Can anyone assist me in making it multiplayer friendly? I have already checked with @e[name=unknown] and there isn't anything in the tags that shows who threw it. Here is the link to the structure file: http://www.mediafire.com/download/mieyjdc6uagsa9a/grapplehook.nbt Just put "grapplehook" in a load structure block to load it. If you don't mind, don't reupload or use this structure or contraption in a map or a .nbt file without my permission, thanks. If you figure out how to make it multiplayer-friendly, please respond to a link with the new structure file or just tell me how to do it.
I'll try to briefly explain how it works.
- The player casts the fishing rod. The bobber entity can only be detected with [name=unknown].
- Once every tick an armor stand is summoned with the grapple tag and is given the same score as Next on gHook. Then 1 is added to Next on gHook.
- This repeats until the bobber hits the ground.
- Once it touches, it is killed and all the ArmorStands are given the grapple2 tag and Next is set to 1.
- The player is teleported to the first ArmorStand (with a gHook score of 1) and that armor stand is killed.
- All ArmorStands with the grapple2 tag have 1 subtracted from their score, making the second ArmorStand the first, the 3rd the 2nd, the 4th the 3rd, etc.
- Repeats step 5 and 6 until all there are no more ArmorStands with the grapple2 tag.
Notes:
-If the player does not have the grappling hook in their hand, all ArmorStands with the grapple tag are killed.
-The player's rotation is divided into 56 points in the sky and the ArmorStands are teleported based on the player's rotation of those 56 points.
Thanks and let me know soon!
/scoreboard players operation player1 dif = player1 stuff
/scoreboard players operation player1 dif -= player2 stuff
Now, ifplayer1
had a higherstuff
score thanplayer2
, his/herdif
score will be positive. If it's the other way around, it will be negative. If they were equal,player1
'sdif
score will be zero.