Started by
samehackofficial
on
Topic category: Help with Minecraft modding (Java Edition)
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.
if you put a print block above the shoot block does it also not always print?
Yes, It doesn't always print. Could the Synced Data variable that tracks the animations progress be the problem?
i'm not sure, can you send the relevant procedures? as pictures or procedure files
Here is the image of my code https://ibb.co/B2kHWB8y
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.
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.
great :3