Zombies moving faster?

Discussion in 'Plugin Development' started by Jakeob22, Jul 9, 2012.

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

    Jakeob22

    Hm, the potion effect isn't doing anything. Even if I set it to 20000 power, the zombies stay at their original speed! D:
     
  2. Offline

    Jakeob22

    Any ideas? ^
     
  3. slowness or speed potion effects doesn't affect mobs :(
    Her plugin seem to do the trick, with some adjustments though, if i can figure out which libraries she's using :S

    which is the craftbukkit jar :p
     
  4. Offline

    Jakeob22

    CorrieKay
    Yeah, I can't really understand what she did there. If she could help me finish this little part, I would be very greatful. :p
     
  5. Offline

    CorrieKay

    Um, sure, ill explain.. But not right now. its like, 1am and im about to head to bed, and its a little more complicated than im willing to explain right this moment x3 Tomorrow!
     
  6. Offline

    Jakeob22

    Thanks! :D
     
  7. sounds great! i want mine to move slower though, but i guess that's just a lower float.
     
  8. Offline

    EnvisionRed

  9. somewhere at the resources section is a way how to hook into the movements of entites, mayby yif you call the entity's move functions 2 times instead of 1 time each tick, it ill move faster
     
  10. so i'm trying this speed thing. but i can't wrap my head around the creation part of a new mob.
    this is how i got, but i don't know how to define the location where the zombies are spawning.

    this is what i got so far:

    HashSet<EntityCreature> mobs = new HashSet<EntityCreature>();
    Location loc = ;
    loc.setY(loc.getY()+1);
    Zombie z = (Zombie) loc.getWorld().spawnCreature(loc, EntityType.ZOMBIE);
    EntityCreature ec = ((CraftCreature)z).getHandle();
    Navigation nav = ec.al();
    nav.a(loc.getX(),loc.getY(),loc.getZ(),0.5f);

    @CorrieKay got any tips? :p
     
  11. Offline

    EnvisionRed

    Nono, don't store EntityCreatures in collections, I believe it causes memory leaks because if it is in a chunk the server unloads, the server will try to unload it, but can't. Store UUIDs of Entities instead and then create a method that returns an entity when supplied with a UUID. Then define your EntityCreature and do the navigation stuff.
     
  12. some guidelines? i'm fairly new to this
     
  13. Offline

    CorrieKay

    i know there was something in the resources forum about how to inject custom mobs into the server (not really custom, but classes that like, extends Zombie, or something)

    I think thats where you need to go, however im not sure where the thread is exactly.
     
  14. can't seem to find anything. anyone got any pointers?
     
  15. Offline

    CorrieKay

    beyond that you need to override the method that contains the method "a()" call, no, not really :\
     
  16. Offline

    Jakeob22

    I'm beyond confused. XD
     
  17. Offline

    CorrieKay

    its not easy stuff, heh, i dont pretend to understand it all.
     
  18. Offline

    EnvisionRed

    I just wish the minecraft server code wasn't so damn obfuscated so we devs can pick through it easier and actually understand anything it does.
     
  19. Offline

    Gawdzahh

    CorrieKay, think you could explain how you would do that using only the standard bukkit API?
    I think it could help alot of other also.
     
  20. CorrieKay likes this.
  21. Offline

    CorrieKay

    I did, but actually making it passive (as in, make the server use it when the mob moves, instead of on a command or something via plugin) isnt something i know how to do off the top of my head
     
Thread Status:
Not open for further replies.

Share This Page