[Tutorial] How to check THE PLAYER for actions (if they have something in their hand, if they killed something, etc)

Started by DerexXD on Sat, 03/20/2021 - 18:30

Topic category: User side tutorials

Last seen on 22:15, 29. Apr 2021
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
[Tutorial] How to check THE PLAYER for actions (if they have something in their hand, if they killed something, etc)
Sat, 03/20/2021 - 18:30

Many of you are aware of this already but this is to those that aren't and want a clear answer to a question along the lines of: how do I check if the player [action] instead of the mob in question?

Many people aren't aware but there's a "SOURCE ENTITY" block that you can replace the "TARGET ENTITY" block inside many procedure blocks.

You can find this by searching it up in the procedures tab.

By doing this, you can check if the "SOURCE ENTITY" (the entity that did something, such as right click on a cow) has something in their hand, such as shears. 

This is especially useful for mob interactions because if you use the default blocks they come with "TARGET ENTITY" which instead checks the MOB for something such as if they have shears in their main hand (where you instead want to check the player)