(SOLVED) Checking if an arrow is in the ground

Started by Emeraldnickel on

Topic category: Help with modding (Java Edition)

Last seen on 02:42, 21. Mar 2024
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(SOLVED) Checking if an arrow is in the ground
Sun, 02/11/2024 - 10:24 (edited)

I'm trying to create a procedure that affects flying arrows and not grounded ones. I know there is an NBT tag for arrows (inGround) that stores whether or not an arrow is stuck in the ground. However, I can't for the life of me figure out how to fetch it in my procedure, or any other vanilla entity NBT tag for that matter. Is there any way to get the value of this tag, or am I going to have to find another way to detect whether or not the arrow is still flying?

Edited by Emeraldnickel on Sun, 02/11/2024 - 10:24
Last seen on 02:42, 21. Mar 2024
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Never mind, figured it out…
Sun, 02/11/2024 - 10:24

Never mind, figured it out with custom code. For anyone wondering, in an Entity Iterator block you need CompoundTag nbtdata = entityiterator.saveWithoutId(new CompoundTag()); in a custom code block up first and then nbtdata.getBoolean("inGround") in a custom code condition. I'd love to see this as an actual feature tbh but this works