How to check if player is in void?

Started by Kiriot22 on

Topic category: Advanced modding

Last seen on 15:14, 24. May 2023
Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to check if player is in void?

I want to make a custom event that if player falls into the void in my dimension then another event runs (teleporting). My question is, how to check if player fell in the void?

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can check if Y coordinate
Thu, 03/31/2016 - 18:58

You can check if Y coordinate is lower than 0.

Last seen on 15:14, 24. May 2023
Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:You can check if Y coordinate
Thu, 03/31/2016 - 19:10

@#1 I know, but what event should I apply and what depencies?

Last seen on 15:14, 24. May 2023
Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried to use this but it
Thu, 03/31/2016 - 19:42

I tried to use this but it doesn't work

On entity hurt:

    if variable isSkyFallEnabled is true

        if block at i, j, k is Block.air

            if block at i, j - 1, k is Block.air

                if block at i, j - 2, k is Block.air

                    if dimension id == 3

                        switch dimension for the entity to 0

                        teleport (i, j + 250, k)

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try make EventHandler class
Thu, 03/31/2016 - 19:56

Try make EventHandler class (you can use empty GUI overlay) and check here event "EntityUpdateEvent" or something called like this.

Last seen on 15:14, 24. May 2023
Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Try make EventHandler class
Thu, 03/31/2016 - 20:38

@#3 Mind giving an example?