0

I play on the Bedrock edition and I'm looking for an easy way to find and count Eyes of Ender inside portal frames. My initial thought was to use testfor but I can't seem to get the coding right. This is what I tired,

/testfor @e[type=Item,name=ender_eye,r=50]

But it just says "No selector with that name", is there a difference between eyes on the ground and eyes already placed in the portal frame? Am I just looking for the wrong name? Anyone with more knowledge on this subject?

1
  • 1
    If it's similar to Java edition, the frames with eyes in them are just a different block state of end portal frames. There is no item entity involved in that process at all. Commented Apr 26, 2020 at 17:12

1 Answer 1

1

As Fabian said, end portal frames simply have a different data value if they have an eye of ender in them or not. Data values 0 to 3 have no eye of ender and are the directions south, west, north, and east. Data values 4 to 7 are the ones with the eye of ender (same directions).

You need to use testforblock:

testforblock <x> <y> <z> end_portal_frame <data value>

You will need to have 4 commands to test for data values 4, 5, 6, and 7 to match all directions that the end portal frame can face.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.