how to detect if a player or mob crossed the block?

Started by ThomasinNoble on

Topic category: General discussion

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to detect if a player or mob crossed the block?

II'm using mCreator and I'm creating a mod that is simply a barbed wire, it will do the same thing as the web block, the player or mob can cross it, however, it will be slow and suffer damage.

The damage I managed to do but to identify if the player or mob is crossing it I couldn't.

I also couldn't make player or mob slow down.

I managed to do the following: when the player clicks on the block with the shovel it takes damage.

 

in this picture is how I did it

https://imgcloud.com.br/share/3n33LEYo2iWArYFR