When I use the minecraft:timer component in my own addons, it seems to break/disable other components like the minecraft:behavior.move_towards_restriction component. I think it does this to the minecraft:behavior.melee_attack, and minecraft:behavior.move_to_block components as well but I couldn't make sure of this. I know its the timer that is causing this because during testing I made the timer activate later on instead of activating right away and before it activated, my mob was actually attacking me until the timer activated which afterwards the mob began to randomly stroll and forget about attacking me. I believe there's possibly other components that the timer breaks that I don't know of.
I kept wondering why my custom entities weren't attacking me like they were supposed to when I was testing them until I finally found out that removing or not having the timer running fixed this.
I use multiple component groups that use the timer in just one entity. I also don't have all of them running at the same time though. I usually just have one or two runnning while the other timers are supposed to activate later on when the component group is called. idk if that info would help in anyway
Attachments
Comments 5
Here's the copy of the addon, sorry for taking so long.
Here's a little run down of what I was trying to do with so many timers. So I was trying to make it where after Saiko (The mob I mentioned based of Saiko from Saiko No Sutoka), sees a target and the target is within her sensor, it will play an animation while she has the target within her sensor. There are multiple animations for this and there is a timer for each animation before they are played. I'm hoping that you could help me with the timer situation so that I can keep this in the addon.
Resolving temporarily as Awaiting Response. Is this still an issue in the latest version of the game?
This ticket will reopen automatically when you reply.
Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
Entities can only have one instance of a component at a time, so which version of timer was added most recently will be the “active” one. Likewise, when you remove a component group that contains a particular component such as behavior.melee_attack, the entity then will not have that component at all.
If this does not explain the issue you are having then please attach a copy of the addon for testing and evaluation.