Sneak function on player tick update

Started by Tengrip on Thu, 05/27/2021 - 23:10

Topic category: Help with modding (Java Edition)

Last seen on 18:34, 12. Jun 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sneak function on player tick update
Thu, 05/27/2021 - 23:10

Essentially what i'm attempting to do is create an enchantment that causes a player to turn invisible when no hostile mobs are within a predefined range of the player, There is no global trigger for sneaking so I use "on Player Tick Update" followed by an if statement detecting the enchantment and if the player is sneaking. Essentially what I think is happening is it's causing an infinite loop when I press crouch instantly causing a crash.

Anyone have any ideas or a better way to do this?

Procedure Block

Last seen on 02:00, 1. Aug 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
idk something like this? set…
Sat, 07/03/2021 - 23:55

idk something like this?

set it as global procedure

you could try building from there.

https://imgur.com/a/RAUosCQ

Last seen on 02:00, 1. Aug 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
idk if you even cancel that…
Sat, 07/03/2021 - 23:55

idk if you even cancel that tho