Solved Check if entity is inside an entity

Discussion in 'Plugin Development' started by gamingod, May 26, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    gamingod

    Hello,
    I wanted to know, how can I check if a entity is inside of another entity. Specifically, if a player is inside of a falling block.
    Thank you,
    gamingod
     
  2. Offline

    xMrPoi

    Get the locations and get the distances between them. That would probably work
     
  3. Offline

    mine-care

    Or just get exac location and round it from xxx.xxxxxxxxxxxxx to xxx.xxxxx and if it matches the other players rounded location, do stuff :)
     
  4. Offline

    Onlineids

    Try getting both locations
    Location x = location1
    Location y = location2
    if(x.distance(y) < 1){
    they are in same block
    }
     
  5. Offline

    gamingod

    Thanks, it worked!!! :D
     
    Onlineids likes this.
Thread Status:
Not open for further replies.

Share This Page