Zombies moving faster?

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

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

    Jakeob22

    Any idea how I could have zombies move faster than usual? Thanks! :D
     
  2. Offline

    ZeusAllMighty11 Retired Staff

    It's been done, not sure how it works.

    I believe CorrieKay has done this before.
     
  3. Offline

    Jakeob22

    I've looked at his posts and it says they've only been able to edit the movement of Zombie Pigmen and Enderman. D:
     
  4. Offline

    ZeusAllMighty11 Retired Staff

    Well someone has unlisted videos on YouTube, seen them, where they alter the speed of mobs. I think they edited base classes though.
     
  5. Offline

    Jakeob22

    oh, so it's uneditable via plugins. D:
    Oh well, my plugin should be fine without that. xD
     
  6. Offline

    CorrieKay

    She*

    also, this?

    This can be done via plugin.
     
  7. Offline

    tincopper2

    • Trolling/Flaming
    Your link appears to be a mod not a plugin, gosh noobs, lol
     
  8. Offline

    bobacadodl

    Can't you just add the speed potion effect to them? Not sure if you can add potion effects to mobs though… try it!
     
  9. Offline

    CorrieKay

    Go play dumb somewhere else please.
     
    WarmakerT, pers2981, Ne0nx3r0 and 4 others like this.
  10. Offline

    bobacadodl

    Something like this in your listener class maybe?:
    Code:
        public void onZombieSpawn(CreatureSpawnEvent event){
            event.getEntity().addPotionEffect(new PotionEffect(PotionEffectType.SPEED,2147483647, 1));
        }
    You might need to add a delay before applying the potion effect to it. Also, the ridiculously large amount for potion duration might cause lag. Try and figure out if there's another less-intensive way to make potions last 'unlimited' :p
     
  11. Offline

    CorrieKay

    Maybe, but i think using a potion effect may be a little less... accurate than the OP is looking for. Then again, might just do the trick.
     
  12. Offline

    bobacadodl

    Potion effects will do what he is looking for :) "have zombies move faster than usual" . He hasn't really provided much detail so you can't really say. Theoretically the potion effect won't change the zombie's behavior in any way but making it faster.
     
  13. Offline

    CorrieKay

    and the strength of the potion (amplifier) will modify just how fast they move, right?
     
  14. Offline

    bobacadodl

    correct. so you can modify the speed easily too :D
     
  15. Offline

    tincopper2

    You're the one to talk *scoffs* :)
     
  16. Offline

    CorrieKay

    What makes you think what i did was a mod instead of a plugin?
     
  17. Offline

    tincopper2

    No evidence of a potential plugin. Looks like you're in SP.
     
  18. Offline

    bobacadodl

  19. Offline

    CorrieKay

    Are you shitting me? Gimme a sec, ill rebuild the entire plugin for you :l

    Gimme a few minutes, ill remake it.
     
  20. Offline

    bobacadodl

    So you call her a noob and say that it is a mod?
     
  21. Offline

    CorrieKay

    Food for thought, while we wait. Look up a little thing called reflection, its not that hard. (well, not really, but.. Whatever)

    also, read this

    http://forums.bukkit.org/threads/setting-new-direction-for-creatures-to-go-in.74489/#post-1108987

    Next time ask how i did it, instead of accusing me of shit like that.

    tincopper2

    Enjoy your <Edit by Moderator: Redacted mediafire url>

    Type /test to spawn a zombie. you can spawn as many as you like. To move them, click. They move wherever youre looking.

    Enjoy.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 10, 2016
    LucasEmanuel likes this.
  22. Offline

    tincopper2

    [quote uid=90595184 name="bobacadodl" post=1206446]So you call her a noob and say that it is a mod?[/quote]
    sure

    [quote uid=90653040 name="CorrieKay" post=1206451]tincopper2

    Enjoy your <Edit by Moderator: Redacted mediafire url>

    Type /test to spawn a zombie. you can spawn as many as you like. To move them, click. They move wherever youre looking.

    Enjoy.[/quote]
    whatevs

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 10, 2016
  23. Offline

    CorrieKay

    Wonderful :|
     
  24. Offline

    gjossep

    Could you maybe show the source of that plugin?
     
  25. Offline

    TnT Retired Staff

    CorrieKay
    Well done.

    tincopper2
    Stop trolling and spreading misinformation. If you don't know how to do something, its better to just say so, than assume it can't be done.
     
    LucasEmanuel and CorrieKay like this.
  26. Offline

    tincopper2

    • Flaming
    Do you remember me saying "whatevs" or r u blind?
     
  27. Offline

    TnT Retired Staff

    I did. You obviously missed me warning you about flaming.
     
  28. Offline

    Jakeob22

    Wow, I got a crapload of responses while I slept. xD
    Yeah, I tried to add the potion effect but it wasn't letting me. Yeah, that would work fine. I'm also going to check out CorrieKay's stuff. :D
     
    CorrieKay likes this.
  29. Offline

    CorrieKay

    Thanks! Means a lot :3


    edit:
    gjossep
    heres the source:
    Code:java
    1. package me.Corrie.TestPlugin;
    2.  
    3. import java.util.HashSet;
    4.  
    5. import net.minecraft.server.EntityCreature;
    6. import net.minecraft.server.Navigation;
    7.  
    8. import org.bukkit.Bukkit;
    9. import org.bukkit.Location;
    10. import org.bukkit.command.Command;
    11. import org.bukkit.command.CommandSender;
    12. import org.bukkit.craftbukkit.entity.CraftCreature;
    13. import org.bukkit.entity.EntityType;
    14. import org.bukkit.entity.Player;
    15. import org.bukkit.entity.Zombie;
    16. import org.bukkit.event.EventHandler;
    17. import org.bukkit.event.Listener;
    18. import org.bukkit.event.player.PlayerInteractEvent;
    19. import org.bukkit.plugin.java.JavaPlugin;
    20.  
    21. public class TestPlugin extends JavaPlugin implements Listener{
    22. HashSet<EntityCreature> mobs = new HashSet<EntityCreature>();
    23. public void onDisable(){
    24.  
    25. }
    26. public void onEnable(){
    27. Bukkit.getPluginManager().registerEvents(this,this);
    28. }
    29. @Override
    30. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
    31. Player player = (Player)sender;
    32. Location loc = player.getTargetBlock(null, 100).getLocation();
    33. loc.setY(loc.getY()+1);
    34. Zombie z = (Zombie) loc.getWorld().spawnCreature(loc, EntityType.ZOMBIE);
    35. EntityCreature ec = ((CraftCreature)z).getHandle();
    36. mobs.add(ec);
    37. return true;
    38. }
    39. @EventHandler
    40. public void oninteract(PlayerInteractEvent event){
    41. Location loc = event.getPlayer().getTargetBlock(null, 100).getLocation();
    42. loc.setY(loc.getY()+1);
    43. for(EntityCreature ec : mobs){
    44. Navigation nav = ec.al();
    45. nav.a(loc.getX(),loc.getY(),loc.getZ(),1.0f);
    46. }
    47. }
    48.  
    49. }


    also, its not really reflection as it is hacky. I misused the term earlier, apologies.
     
    LucasEmanuel likes this.
  30. Offline

    Rick132500

    You always make the best mods :3
     
Thread Status:
Not open for further replies.

Share This Page