detect if certain type of tipped arrow is in the block

Started by fenixgalax on

Topic category: Troubleshooting, bugs, and solutions

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
detect if certain type of tipped arrow is in the block

i created a potion effect and its counterparts where there is basic splash and lingering and ofc arrow... effect applies flawlesly however when it comes to arrows i need it to do something else if it hits ground or block compared to when it hits entity... i looked everywhere and for the love of me cant figure out how to detect vanilla arrow with custom potion effect hitting a ground or any block for that matter. in custom projectiles elements there is trigger for where one can call upon a function when projectile hits the ground but nothing alike for vanilla elements to be called upon... i was looking in additional trigers in the dropdown menu from the aditional triggers but none cover projectile hitting the block... Did anyone ever encounter such thing and if so how did you resolve it? im using mcreator 2025.3 for minecraft version 1.21.1

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Entity tick update, check…
Thu, 06/18/2026 - 17:01

Entity tick update, check that entity is type arrow, then get nbt on entity of what potion is applied to the arrow, there is also nbt inGround true or false for when it is in the ground

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nah tried those turns out…
Thu, 06/18/2026 - 17:16

nah tried those turns out for some reason arrow doesnt work with entity tick updates .... but i figured a primitive workaround tho

two commands in the player tick update
/execute as @e[type=arrow,nbt={inGround:1b,item:{components:{"minecraft:potion_contents":{potion:"mod:modPotion"}}}}] at @s run//whatever you want to do here//
/execute as @e[type=arrow,nbt={inGround:1b,item:{components:{"minecraft:potion_contents":{potion:"mod:modPotion"}}}}] at @s run kill @s-to prevent command to run indefinitely.



that being said if someone has better and more optimized solution please share... ty