Teleport mobs to own location every tick?

Discussion in 'Plugin Development' started by TheFluffey, Dec 14, 2012.

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

    TheFluffey

    I appreciate this more than you can know. Thank you so much. It means a whole lot.

    Edit: Tried it, put it in a new class and included the class in the main. Didn't work. Will try to put into one class.

    Now works perfectly inside of main class. Can't thank you enough! How would I go about changing it to 1/2 a second? Change both 20L's to 10L?

    Also: This is teleporting mobs every 1 second no matter what. Is there a way to check if the mob has moved or not?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  2. Offline

    fireblast709

    1 tick = 50ms, so 20 ticks = 1 second. So if you use 10L (the L means long value), that would be 0.5 seconds
     
  3. Offline

    TheFluffey

    Do I use it for both?
     
  4. Offline

    fireblast709

    the first one is the initial delay (so how long it waits since that line executed), the second line is the interval. You want it to tick each half a second, so at least change the second one
     
Thread Status:
Not open for further replies.

Share This Page