I can't use the detect hit block function on my projectile

Started by domadex on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can't use the detect hit block function on my projectile

I'm currently making a sword that allows you to throw it. However, in order to make sure it properly returns to the player after it's thrown, even if it hits a block, i need to detect if the projectile hits a block.

It uses a custom model, more specifically, this one: https://www.planetminecraft.com/texture-pack/oathbringer-shardblade/, however, through block bench, i have converted it to a java entity model as is necessary with custom projectile models.

Thanks for any help.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why can't you use the When…
Thu, 10/09/2025 - 15:22

Why can't you use the When projectile hits block trigger?

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Uhhhh what do you mean? I…
Fri, 10/10/2025 - 11:46

Uhhhh what do you mean? I just can't use it. Like when the projectile hits a block, it just doesn't do the procedure. For example, If the procedure was to send a message in the chat, it wouldn't send the message in the chat

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
are you sure you have…
Fri, 10/10/2025 - 12:47

are you sure you have connected the procedure to the trigger properly?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it's kinda hard to see but…
Fri, 10/10/2025 - 12:47

it's kinda hard to see but the "test" projectile is a moss carpet

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Let me send some images
Fri, 10/10/2025 - 13:45

Let me send some images

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The projectile base This…
Fri, 10/10/2025 - 13:46

The projectile base

This triggers when the projectile hits a block

This is what releases the projectile

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you send a picture of…
Fri, 10/10/2025 - 13:48

can you send a picture of the triggers tab of the projectile

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(No subject)
Fri, 10/10/2025 - 14:19

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
does it trigger correctly if…
Fri, 10/10/2025 - 14:24

does it trigger correctly if you spawn the projectile with /summon?

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nope. Also, for some reason,…
Sat, 10/11/2025 - 11:21

Nope.

Also, for some reason, when I tried it today, it worked, but when i rebooted the game, it went back to being unusable