Advertisement
Eta740

MC Lifetime Tracking

Dec 11th, 2018
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. Non proper syntax / name for 1.12
  2. For 1 target pigman being alive at a time (probably can be improved for multiple simultaneous but don't have time for that)
  3.  
  4. initial setup
  5. scoreboard objective "counter" + setdisplay belowName
  6. scoreboard tag "tracked" + tag the alarm pigmans with it
  7.  
  8. cmd block - timer (anywhere around the farm)
  9. (repeat) execute @e[type = pigman, r = 100, tag != "tracked"] summon armorstand ~ ~ ~
  10. (chain) execute @e[type = pigman, r = 100, tag != "tracked"] scoreboard @e[type = armorstand, tag != "tracked"] "counter" + 1
  11.  
  12. cmd block - resetter (at death pos with pressure plate)
  13. (impulse) scoreboard @e[type = armorstand, tag != "tracked"] tag armorstand with "tracked"
  14.  
  15. ===================================================================================================
  16. Ideas for improvement
  17. if you can compare an entity's score directly with another entity's score in the selector (which idk if you can in 1.12)
  18.  
  19. (repeat + chain)
  20. use another scoreboard objective "id" for both armorstand and pigman
  21. all pigman not tagged will summon new armorstand + any other 1 time behavior upon spawning (eg place button to prevent repeats)
  22. all armorstand will add 1 to "id" for pigman/armorstand not tagged
  23. all pigman/armorstand gets tagged
  24. all pigman add 1 to "counter" on armorstand with same "id" score
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement