I am trying to create a machine that spawns a tamed saddled horse when a player throws a snowball. I've seen some outdated similar videos like the one below, but they're for 1.8 and use "c=-1" to get the youngest entity. I've seen that "limit" replaces "c" now, but limit does not allow for negative values. How can I recreate the machine in the video, but for 1.13? How can I target the youngest entity?
How would you do that? Would it be through the scoreboard? Perhaps one could set a special tag to the entity that increments by one on the scoreboard every time the player spawns a new one by throwing the snowball?
Just found a better way to do what I had in mind, requiring only two comman blocks. The first spawns a horse at the location of all snowballs with the name “Horse.” The next chained command block deletes all snowballs named “Horse.” When the player throws the snowball, the horse immediately spawns. No need to wait for the snowball to hit the ground or to detect age because it’s instantaneous.
Hello all!
I am trying to create a machine that spawns a tamed saddled horse when a player throws a snowball. I've seen some outdated similar videos like the one below, but they're for 1.8 and use "c=-1" to get the youngest entity. I've seen that "limit" replaces "c" now, but limit does not allow for negative values. How can I recreate the machine in the video, but for 1.13? How can I target the youngest entity?
Thanks in advance!
Simple answer: You Cannot.
1.13 has changed alot of things, including how it sort targets. There are 4 different sort:
As you can tell, there's simply no way to sort entities by their age, in 1.13
I'm a programmer. I use C/C++, BASIC, Assembly, and Python. If i sound too technicial, that's because it's the way i think.
My Suggestions
The c=-1 refers to the farthest, not the youngest.
Btw, I have a complicated way to select the youngest or the oldest in minecraft 1.13.
ewe
How would you do that? Would it be through the scoreboard? Perhaps one could set a special tag to the entity that increments by one on the scoreboard every time the player spawns a new one by throwing the snowball?
Yeah you're right.
1. For the youngest:
Sort is dummy, everything is sorted from the youngest to the oldest.
2. For the oldest:
Count and Sort are dummies, everything is sorted from the oldest to the youngest.
ewe
Just found a better way to do what I had in mind, requiring only two comman blocks. The first spawns a horse at the location of all snowballs with the name “Horse.” The next chained command block deletes all snowballs named “Horse.” When the player throws the snowball, the horse immediately spawns. No need to wait for the snowball to hit the ground or to detect age because it’s instantaneous.
Thanks for the help!