How do I fix projectile shooting procedure not shooting projectiles sometimes

Started by samehackofficial on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I fix projectile shooting procedure not shooting projectiles sometimes

Hello, I have a mob I'm creating that plays an animation and shoots at a certain part of the animation, and to do this, I use the mob's "on tick" procedure. I made a variable in synced data that tracks the animation's progress, and when it gets to the part of the animation where it's supposed to shoot, half of the time it doesn't even shoot or the shot is delayed, I'm using the "Shoot [projectile] from [x] [y] [z] with direction [dx] [dy] [dz] speed [speed] inaccuracy [inaccuracy]" block to shoot projectiles. Please help me with this issue.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if you put a print block…
Sat, 09/20/2025 - 19:50

if you put a print block above the shoot block does it also not always print?

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, It doesn't always print…
Sat, 09/20/2025 - 22:45

Yes, It doesn't always print. Could the Synced Data variable that tracks the animations progress be the problem?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i'm not sure, can you send…
Sun, 09/21/2025 - 07:24

i'm not sure, can you send the relevant procedures? as pictures or procedure files

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm thinking it could be…
Sun, 09/21/2025 - 14:41

I'm thinking it could be because this code is running on both client and server side and you're checking if it's exactly 13. So if they're desynced and the client happens to be the only side that passes that condition, it can't do stuff like making an entity shoot.

So does any of this code need to run on the client?

If not try adding,

to the start.

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I put the piece of code you…
Sun, 09/21/2025 - 15:23

I put the piece of code you recommended but I put a "not" block before the "Is provided world client-side" block and it works as intended now. Thank you for helping me with this issue.