How to prevent a player from sneaking while on a specific block

Started by RoboMan on

Topic category: Help with modding (Java Edition)

Last seen on 06:49, 13. Oct 2022
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to prevent a player from sneaking while on a specific block

I have a custom block, and I do not want players to be able to sneak while on the block. How would I make it so that they cannot sneak while on this block?

Last seen on 01:05, 10. Oct 2021
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wow, this was harder than…
Thu, 10/07/2021 - 09:37

Wow, this was harder than expected

Trigger on walk, set sneak to false. Didn't work. (had to start with the basics lol)

Reduce bounding box y->15 (ala soul sand). Trigger on collide: set sneak to false. Didn't work

On Player Update: If block at x y-0.5 z = NoSneakBlock: set sneak to false. Still Didn't work

Last seen on 06:49, 13. Oct 2022
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Apologies, but I have found…
Sat, 10/09/2021 - 21:59

Apologies, but I have found a different way entirely to solve this issue. I was able to use the radius function and it worked perfectly. Thanks you for trying to help, though!