[Tutorial] How to make a Player Detector

Started by InterPlay on

Topic category: User side tutorials

Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] How to make a Player Detector
Thu, 04/24/2025 - 14:25 (edited)

Hi there!

 

So, first of all, what you will need is the actual block that will detect the player. You can set it the way you prefer. The only thing that's actually necessary for this tutorial is that you make it tick all the time:

As you can see, you just need to access the advanced properties tab and set the tick rate to 1, everything else can be whatever you like.

I have set this block to emit redstone when it detects a player, but you don't have to do the same. This is just an example of what you can do.

 

Second of all: now you just need to make the procedure to actually detect the player. This is how I've done it:

As you can see here, it is detecting the player in a square cube size of 5, but, at the same time, it is only detecting if the player is in a specific coordinate inside of that are, which is what I want for this example: I want it to detect the player only when he is right in front of the detector.

Then you might ask: "Why you are not using a detection radius to be just the size of the block you want the player to be at?"

Because, if I do that, once it have detected the player, it will keep on even after the player have moved away of that position. I need to detect in a larger area so the block knows that the player is not in the desired place anymore.

 

Then I made it change it's blockstate to one, which make it change the backlight to be on. And then, at the end, I made it return the value of the redstone emitted. This is why this procedure is listed in that drop down menu in the advanced properties page.

 

This is the final result:

https://imgur.com/a/HfpmC9b

Edited by InterPlay on Thu, 04/24/2025 - 14:25