Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Check when entity collide with block

Comments in 'Plugin Development' started by Flabe, Apr 9, 2016.

  1. Flabe
    Offline

    Flabe Active Member

    Joined:
    Nov 17, 2015
    Posts:
    147
    Minecraft User:
    Flabe231
    Hey guys, i need to check when some entity i created with my code collide with block... Any function for it??
    Or how do I use boundingBox() correctly with it? Thanks for helping)
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    $Player->getBlocksAround()
    applqpak likes this.
  3. Flabe
    Offline

    Flabe Active Member

    Joined:
    Nov 17, 2015
    Posts:
    147
    Minecraft User:
    Flabe231
    thx
  4. Flabe
    Offline

    Flabe Active Member

    Joined:
    Nov 17, 2015
    Posts:
    147
    Minecraft User:
    Flabe231
    hmm it not works
    PHP:


    foreach($entity->getBlocksAround() as $b){ 

    if (
    $b->getBlockId() != 0){
     
    my code
    }
    }



  5. Flabe
    Offline

    Flabe Active Member

    Joined:
    Nov 17, 2015
    Posts:
    147
    Minecraft User:
    Flabe231
    THANK YOU ALL GUYS I SOLVED IT!!!!! Lol:D

Share This Page

Advertisement