Ranged Item OnBlockHit procedure is wacky

Status
Fixed
Type
Product/platform
MCreator/Windows
Priority
Normal
Issue description

Basically any procedure that you make and set to be triggered when the bullet of a ranged item hits a block, runs twice somehow. I have included a workspace that effectively demonstrates this problem. But hang on it gets even weirder: if the bullet hits an entity, it runs the block hit procedure too! (but not twice) How weird is that!? Anyways it is kinda getting me stuck because it breaks my things that should work just fine. Hope I helped.

Attachment Size
Ranged Item Bug Reproduction.mcr43.85 KB 43.85 KB

Issue comments

We will improve the bullet collision procedures in the future.

It is called twice because it is called on the server and on the client side. To fix this, wrap your procedure with if statement and the if condition should be "Is provided world server side" procedure block from the World data tab in procedure editor.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.