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

Started by DerexXD on

Topic category: User side tutorials

Last seen on 05:39, 24. Apr 2024
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] How to check THE PLAYER for actions (if they have something in their hand, if they killed something, etc)

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) 

 

Last seen on 05:19, 26. Mar 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For some reason this doesn't…
Wed, 01/31/2024 - 04:52

For some reason this doesn't work for me if the item used is a lead