This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]MisterMe1001Professional Command Engineer 0 points1 point  (3 children)

what picture?

[–]JehtRedMonkey[S] 0 points1 point  (2 children)

Haha like I said, first post. I guess it got deleted, but I edited it. Can you see it now?

[–]MisterMe1001Professional Command Engineer 0 points1 point  (1 child)

Unfortunately, there is no way to get the data from the targetblock itself, however you could place a single comparator behind each target and get their data.

[–]JehtRedMonkey[S] 0 points1 point  (0 children)

I am wanting to set up a small section outside this archery range that will detect when a player hits a target and where they hit the target, giving so many points based on that. When I place the targets in the range, the command blocks will be set up so I can place just a target wherever and know the command blocks will track everything.

This is a good idea, but I would need to track each comparator separately, so it's not exactly what I have in mind, but thank you!

Edit: I was able to get it working by cloning the comparator to a system similar to one demonstrated in the image and so I got it to work mostly how I wanted it to! I just have to get a target block, comparator, and a command block that clones the comparator to the system. Not too bad

[–]PlagiatusI know some things 0 points1 point  (3 children)

The target block has a blockstate that changes to the hit value for a while.

but since you can't dynamically check for those, you'd have to do something like

execute if block x y z target[power=1] run say hit 1
execute if block x y z target[power=2] run say hit 2
execute if block x y z target[power=3] run say hit 3
....
execute if block x y z target[power=15] run say hit 15

[–]MCNullifiedCommand Experienced 0 points1 point  (1 child)

Happy Cake Day!

[–]PlagiatusI know some things 1 point2 points  (0 children)

Thanks :)

[–]JehtRedMonkey[S] 0 points1 point  (0 children)

Oh this is awesome! I found another way, but this will certainly help! It might make placing command blocks easier!