akon1248

Untitled

Dec 12th, 2018
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. command /getgrappleinghook:
  2. trigger:
  3. give player fishing rod with nbt "{display:{Name:""&6Grappling Hook""},ench:[{id:0s,lvl:0s}],HideFlags:5,Unbreakable:1b}"
  4. send "&7You got &6Grappling Hook&7!"
  5. on fishing:
  6. if name of player's tool is "&6Grappling Hook":
  7. if fishing state is IN_GROUND:
  8. push player direction from player to fishing hook at speed distance between player and fishing hook/3.5
  9. if difference between y-coordinate of player and y-coordinate of fishing hook <= 2:
  10. set {_speed} to distance between player and fishing hook/30
  11. if {_speed} < 0.5:
  12. if distance between player and fishing hook >= 2:
  13. set {_speed} to 0.5
  14. push player upwards at speed {_speed}
  15. if fishing state is CAUGHT_ENTITY:
  16. caught entity is a living entity
  17. push caught entity direction from caught entity to player at speed distance between player and fishing hook/4
  18. push caught entity upwards at speed 0.5
  19. if fishing state is FISHING:
  20. loop blocks in radius 10 around location 1 meter above location of player:
  21. if loop-block is target block:
  22. set {_targetblock} to loop-block
  23. if {_targetblock} is not set:
  24. push fishing hook in direction of player at speed 8
  25. else if name of player's offhand is "&6Grappling Hook":
  26. if fishing state is IN_GROUND:
  27. push player direction from player to fishing hook at speed distance between player and fishing hook/3.5
  28. if difference between y-coordinate of player and y-coordinate of fishing hook <= 2:
  29. set {_speed} to distance between player and fishing hook/30
  30. if {_speed} < 0.5:
  31. if distance between player and fishing hook >= 2:
  32. set {_speed} to 0.5
  33. push player upwards at speed {_speed}
  34. if fishing state is CAUGHT_ENTITY:
  35. caught entity is a living entity
  36. push caught entity direction from caught entity to player at speed distance between player and fishing hook/4
  37. push caught entity upwards at speed 0.5
  38. if fishing state is FISHING:
  39. loop blocks in radius 10 around location 1 meter above location of player:
  40. if loop-block is target block:
  41. set {_targetblock} to loop-block
  42. if {_targetblock} is not set:
  43. push fishing hook in direction of player at speed 8
  44. every tick:
  45. loop all players:
  46. if loop-player's tool is fishing rod:
  47. if name of loop-player's tool is "&6Grappling Hook":
  48. add "{FallDistance:0}" to nbt of loop-player
  49. if loop-player's offhand is fishing rod:
  50. if name of loop-player's offhand is "&6Grappling Hook":
  51. add "{FallDistance:0}" to nbt of loop-player
Advertisement
Add Comment
Please, Sign In to add comment