Duplicating items when spawning then upon hitting blocks, players or entities

Started by Frostlith on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Duplicating items when spawning then upon hitting blocks, players or entities

So I'm attempting to create a throwable item that breaks into its raw resources when it hits anything but unfortunately it flares up both the "hit block" and "hit entity" triggers simultaneously allowing a player to accidentally double their original resource amount by hitting two at once, are there any solutions for this? Mcreator 2026 ftr

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Are you saying that the item…
Wed, 04/08/2026 - 16:39

Are you saying that the item runs both procedures when it hits either an entity or a block?

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Its frequently hitting both…
Thu, 04/09/2026 - 09:43

Its frequently hitting both an entity and a block causing each instance of the same procedure to run at the same time. but if it just hits a block for example it works fine. I just dont really know how to stop it running the code for each one from hitting both an entity and a block at the same time with the same projectile

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Despawn the entity at the…
Thu, 04/09/2026 - 19:27

Despawn the entity at the beginning of the procedure?

 

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If your projectile size is…
Fri, 04/10/2026 - 02:53

If your projectile size is bigger than 0.5 it will cause this to happen too, so make sure it is 0.5 or lower first.

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ohhhh good idea thanks i'll…
Fri, 04/10/2026 - 18:16

ohhhh good idea thanks i'll see if it works