Solved Disabling a mobs movement with NMS

Discussion in 'Plugin Development' started by Anonomoose, Jul 10, 2014.

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

    Anonomoose

    Hi all,

    I've been playing around with NMS and following some reflection tutorials around here to create a custom mob with different attributes. Since the names are always changing each update it's hard to keep track of how to do certain things, and I haven't been able to figure out how to bring a mobs movement speed down to 0 because of all the different method name changes.

    Does anyone have any idea on how to do this with the recent update(s)?

    Thanks a lot, I appreciate it!
     
  2. Offline

    _Filip

    You can figure out the new method names yourself.

    What kind of movement do you wish to prevent?
    AI movement, or when it's pushed?
     
  3. Offline

    Anonomoose

    TheSpherret
    Thinking about it, both would be necessary.
     
  4. Offline

    macboinc

    What mob is this going to be?
     
  5. Offline

    Anonomoose

    macboinc
    Ah yeah forgot to say, it's a skeleton

    So I've managed to make it so the mob doesn't move on it's own, but I'm pretty stumped when it comes to being pushed by other entities - anyone have any suggestions on where I'd need to be looking for that?

    I've looked here and found the collide and g methods, which I could use to disable movement caused by collision, but then that would prevent collision with all different entities right? Which isn't something I think I want to be doing..

    EDIT: For anyone looking for this, no it doesn't, the methods are specific to the entity in the class you're overriding the method in (duh)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  6. Offline

    macboinc

    Can you send me the code?
     
Thread Status:
Not open for further replies.

Share This Page