Immovable mobs

Discussion in 'Plugin Development' started by NemesisMate, Oct 19, 2012.

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

    NemesisMate

    How can I make a mob stay immovable in its place so nobody can move it?.

    When a player or another mob touch a mob this one is displaced and I don't want this to happen.

    Thanks for any help!
     
  2. Offline

    NemesisMate

    I can make them stay in there without moving, but I can't make them immovable... nobody knows how to do it?
     
  3. Offline

    kabbage

    When a mob spawns, you could record their location and save it somewhere (Such as a hashmap that maps an entity to it's spawn location).

    Than, have a repeating task check all of the entries in the hashmap. If any entity is at a location that isn't their spawn, teleport them back.

    You may also want to create a custom EntityMoveEvent, and always set it as cancelled.
     
Thread Status:
Not open for further replies.

Share This Page