Advertisement
Guest User

farming shiz

a guest
Feb 19th, 2017
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. options:
  2. Item: coal
  3. ItemName: car
  4. commandname: car
  5. displayname: setme
  6.  
  7. command {@commandname}:
  8. trigger:
  9. give player {@Item} named "{@ItemName}"
  10.  
  11. on rightclick with coal:
  12. if name of player's tool is "car":
  13. spawn a chicken 1 above and infront of player
  14. clear all pathfinder goals of spawned entity
  15. set silent state of spawned entity to true
  16. set {_uuid} to tag "UUIDMost" of nbt of spawned entity
  17. #Use this to get a uuid since uuid of spawned entity said <none>
  18. add {_uuid} to {CartsList::*}
  19. set display name of spawned entity to "{@displayname}"
  20. #add it to a list so we know whats a car and also persist through a restart
  21. remove coal named "{@ItemName}" from player
  22.  
  23.  
  24. on death:
  25. set {_uuid} to tag "UUIDMost" of nbt of victim
  26. if "%{CartsList::*}%" contains "%{_uuid}%":
  27. clear drops
  28. give attacker {@Item} named "{@ItemName}"
  29. remove {_uuid} from {CartsList::*}
  30.  
  31.  
  32. on rightclick on chicken:
  33. set {_target} to targeted entity
  34. set {_uuid} to tag "UUIDMost" of nbt of targeted entity
  35. if "%{CartsList::*}%" contains "%{_uuid}%":
  36. make player ride {_target}
  37. wait 5 ticks
  38. while vehicle of player is {_target} :
  39. change yaw of vehicle of player to yaw of player
  40. change pitch of vehicle of player to pitch of player
  41. set {_block} to block above player
  42. if {_block} is ripe wheat:
  43. set block at {_block} to air
  44. give player wheat
  45. #checks what block is at the player
  46. wait 1.5 tick
  47.  
  48.  
  49. on vehicle steer:
  50. #if event-button is space:
  51. # push vehicle of player upwards at speed 0.4
  52. #disabled chicken flying
  53.  
  54. if event-button is w:
  55. push vehicle of player in the direction of player at speed 0.4
  56. if event-button is a:
  57. push vehicle of player to the left at speed 0.1
  58. if event-button is d:
  59. push vehicle of player to the right at speed 0.1
  60. if event-button is s:
  61. push vehicle of player backwards at speed 0.2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement