Started by
Kiriot22
on
Topic category: Advanced modding
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?
Topic category: Advanced modding
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?
You can check if Y coordinate is lower than 0.
@#1 I know, but what event should I apply and what depencies?
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)
Try make EventHandler class (you can use empty GUI overlay) and check here event "EntityUpdateEvent" or something called like this.
@#3 Mind giving an example?