Find location of falling block

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

pokw

Active Member
Jun 3, 2019
53
1
8
I'm trying to make a skript to find the landing location of a falling block.

Idea 1:
- On place of sand, look for a falling block entity at the location of the event
- Continue following the location of the entity until it no longer exists
- Look at the last location of the entity when it got deleted to find the block

Idea 2:
- On place of sand, find the entity
- Until death of entity, loop blocks below where the sand was placed until a solid block was found
- Find the location above the solid block

The problems with these ideas are checking entities repeatedly and quickly, slabs/torches/players breaking the sand, and other inconsistencies. Does anyone know a consistent way to find the final location of a falling block?