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

Started by ThomasinNoble on

Topic category: General discussion

Active 1 year ago
Joined May 2023
Points:
153

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
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