Stopping any certain mob from walking through a set region.

Discussion in 'Plugin Development' started by Cloaking_Ocean, Apr 20, 2014.

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

    Cloaking_Ocean

    So the problem I have is I want to be able to stop any kind of mob (defined in a command or in a config) to not be able to walk through a metaphorical wall set by WorldEdit. I know how to set the region and get the blocks and save them and all that but what I can't do is get any kind of mob like a zombie from not walking into it because there is no EntityMoveEvent or CreatureMoveEvent. And if I tried to edit the classes of the zombies all of the zombies would be effected not just the ones that are entering the wall. Any help is apprciated and thanks in advance.
     
  2. Offline

    CoderMusgrove

    Here's the thing, well, you have to make your own entities to accomplish this. This means using NMS (Net Minecraft Server) and will break just about every update of minecraft.
     
  3. Offline

    Cloaking_Ocean

  4. Offline

    ever_x

    Cloaking_Ocean
    Well, it's low-key, but you could have a scheduler running every seconds, or every tick, that iterates through all the entities on the server and checks thier location. If it is inside the WorldEdit region, teleport them to the nearest location outside of the region. I haven't tried it myself, so some experimentation might be needed, but give it a go!
     
    KingFaris11 likes this.
  5. Offline

    Cloaking_Ocean

    ever_x Okay Thanks I'll try it out :D.
     
Thread Status:
Not open for further replies.

Share This Page