Check if entity collides with block

Discussion in 'Plugin Development' started by jimbo8, Aug 27, 2014.

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

    jimbo8

    Hey!

    Alright, so, i'm developing a minigame where i need to check if an entity collides with a block. How would i do this?

    Let's say a zombie walks into a grass block, i need to get the material of the block it collides with and set it to a falling block.

    Thanks!
     
  2. Offline

    jimbo8

    parat26

    I didn't even know that this was an event.

    Does this count for every mob, though? A spider, skeleton etc. does not change blocks, but zombies does.
     
  3. jimbo8 I believe yes, but no promises because I have not played around with this event a lot. You can always check the entity with instanceof and examine the behavior of the mobs you want.
     
Thread Status:
Not open for further replies.

Share This Page