Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Non proper syntax / name for 1.12
- For 1 target pigman being alive at a time (probably can be improved for multiple simultaneous but don't have time for that)
- initial setup
- scoreboard objective "counter" + setdisplay belowName
- scoreboard tag "tracked" + tag the alarm pigmans with it
- cmd block - timer (anywhere around the farm)
- (repeat) execute @e[type = pigman, r = 100, tag != "tracked"] summon armorstand ~ ~ ~
- (chain) execute @e[type = pigman, r = 100, tag != "tracked"] scoreboard @e[type = armorstand, tag != "tracked"] "counter" + 1
- cmd block - resetter (at death pos with pressure plate)
- (impulse) scoreboard @e[type = armorstand, tag != "tracked"] tag armorstand with "tracked"
- ===================================================================================================
- Ideas for improvement
- 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)
- (repeat + chain)
- use another scoreboard objective "id" for both armorstand and pigman
- all pigman not tagged will summon new armorstand + any other 1 time behavior upon spawning (eg place button to prevent repeats)
- all armorstand will add 1 to "id" for pigman/armorstand not tagged
- all pigman/armorstand gets tagged
- all pigman add 1 to "counter" on armorstand with same "id" score
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement