When bullet hits block trigger not working when the bullet is shot by a non-player entity

Started by Radikid on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 23:30, 25. Apr 2022
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When bullet hits block trigger not working when the bullet is shot by a non-player entity

Please pardon me if this is not an issue. I looked at previous articles and found this one (https://mcreator.net/tracker/issue/65007) where Klemen explains that ranged item triggers are for ranged items, not their bullets, and that's why the mob doesn't trigger them. I am having an issue with a bullet trigger, not a ranged item trigger.

I don't want my bullets on the ground at all so I created a procedure to despawn them. This procedure is configured to trigger with the "When bullet hits block" trigger. It works perfectly when I shoot the bullet, and it also works perfectly when I spawn the bullet manually using commands (this action not being related to ranged items at all). When an entity is configured to "use a ranged item" for ranged attacks, the bullet trigger does not activate with the bullets shot by the entity. I know that "AI task only shoots bullets, it does not actually use the ranged item" which is why I was stumped when the bullets shot by the entity weren't activating the bullet trigger. I did try to work around this by editing the bullet entity itself with a collision trigger, but I was unable to find the entity at all in the source.

I believe that the "When bullet hits block" trigger is currently bugged.