Advertisement
OMan100

Untitled

Jun 29th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. every second:
  2. loop {farmers::*}:
  3. if block above {_loc} is farmland:
  4. if block above above {_loc} is wheat or carrot plant or potato plant:
  5. if data value of block above above {_loc} is 7:
  6. if block above above {_loc} is wheat:
  7. set {_amount} to 1
  8. set block above above {_loc} to wheat
  9. else if block above above {_loc} is carrot plant:
  10. set {_amount} to 2
  11. set block above above {_loc} to carrot plant
  12. else if block at {_loc.2} is potato plant:
  13. set {_amount} to 3
  14. set block above above {_loc} to potato plant
  15. loop {plants::name::*}:
  16. if {plants::location::%loop-index-2%::*} contains location of block above above {_loc}:
  17. set {_seed} to loop-index-2
  18. exit loop
  19. loop integers from 1 to 10:
  20. if {plants::level::%loop-value-2%::*} contains location of block above above {_loc}:
  21. set {_level} to loop-value-2
  22. exit loop
  23. if {_level} isn't set:
  24. set {_level} to 1
  25. if {_seed} isn't "experience":
  26. set {_a} to {plants::amount::%{_seed}%}*{_level}*{_amount}
  27. add {_a} of {plants::item::%{_seed}%} to inventory of block at {_loc}
  28. else:
  29. set {_a} to {plants::amount::%{_seed}%}
  30. set {_xp} to {plants::xp::%{_seed}%} * {_level}
  31. add {_a} of {plants::item::%{_seed}%} named "&a&lXp Orb &7(&a%{_xp}*{_amount}%&7)" lored "&7Rightclick to gain xp" to inventory of block at {_loc}
  32. can anyone tell me how can i make this more efficient? Because this code is looping many different hoppers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement