sneaking in entity tick update

Started by Darknessay on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sneaking in entity tick update

i have too long procedure of my entity to attach screens, but i will attach whole procedure in believes that someone will help me, please!

my boi have different phases that controlled by his NBT number in tick.
one of them is SLEEPING and i used sneaking animation to force my mob lay on ground while SLEEPING phase, and in this phase i enable his sneaking each tick.
in each out of SLEEPING phase (dmg, or player's near presence) i disable sneeking oncely - in this case, everything works fine but sometimes for some reason, my mob can continue to use his sneaking animation insteed of idle, even if its not in SLEEPING phase.

i tried to DISABLE his sneaking each tick IF phase = 0 (means just WANDERING phase without any targets or goals), but in this case sneaking animation DOESNT play in SLEEPING phase - feels like setting SNEAKING to true or false ignores the place that is this procedure block settled in, like no matter any IFS, it just works any time?

Im already tried any combination and way to ENABLE/DISABLE it. PLEASE, HELP! Q_Q

here is the procedure file on google drive