[Lib][1.7.9] PetMaker V1.0 - How to make pets!

Discussion in 'Resources' started by bigteddy98, May 30, 2014.

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

    bigteddy98

    This resource is no longer availabe.
     
  2. Offline

    SpiritGamerr

  3. Offline

    bigteddy98

    thanks :D
     
  4. Offline

    Phasesaber

    Do you just breath NMS code? Jesus man, you make a new one every day! :D
     
  5. Offline

    xTrollxDudex

    Phasesaber
    Basically, they're all based off of a few classes, it's not too difficult to understand, self explanatory in fact :p
     
  6. Offline

    Onlineids

    You should implement the target finding of a wolf so it attacks what the owner does. Other than that great resource ;)
     
  7. Offline

    Phasesaber

    I just haven't gotten around to learning it.
     
  8. Offline

    MrDplugins

    Wait guys i''ll be right back I just had my mind blown.....
     
    bigteddy98 likes this.
  9. Offline

    bigteddy98

    It's nothing more than a custom pathfinder, but the effect is awesome ;)
     
  10. Offline

    OriKe

    Pretty cool idea!
    but what happend if I relog to the server?
    or someone want to kill my pet?
     
  11. Offline

    TheGamersCave

    Just a quick suggestion, instead of storing the player's object, why not store their UUID and retrieve the player on call?
     
  12. Offline

    bigteddy98

    Yeah that might even be better, I will do an update this afternoon.
     
    TheGamersCave likes this.
  13. Offline

    TheGamersCave

    Awesome :)

    Thanks for the great share, btw.
     
  14. Offline

    TeamJesus

    ok so how do delete pet when you have done makepet as per example up at the top?

    Cheers
     
  15. Offline

    Phasesaber

    In 1.7.9, Bukkit add the getPlayer(UUID id); method, it's really handy.
     
  16. Offline

    bigteddy98

    You want to turn it back into a normal entity? or what? I don't understand ya :p

    I know but I was still wondering if it won't give problems when logging out, but I don't think so. I will update it now.

    Version 1.1 is now available!


    In version 1.1 I made a change (after it was recommended many times) which now supports relogging. Instead of storing the Player object (which also causes memory leaks) I am now storing the UUID of the player. This way your pet will remember who you are, even after a relog.

    I hope you like it, enjoy!
    BigTeddy98, Sander.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 1, 2016
  17. Offline

    lenis0012

    The pathfinding you are using isn't right.
    You should pathfind to an entity instead of a tile.
    And also check if the path doesn't already exist.

    Also you cant customize the speed, pretty bad
     
  18. Offline

    bigteddy98

    ok? what now? it works fine and I am happy with the result, so why is it "bad" as you say? I have my reasons for doing it this way.
     
  19. Offline

    lenis0012

    Its laggy.
    It regenerates a path too often
     
  20. Offline

    unforgiven5232

    bigteddy98 Even though it's easy to create the name and make it visible, you should still put it in the example code. So put something like
    Code:java
    1. Creeper creeper = p.getWorld().spawn(p.getLocation(), Creeper.class);
    2. creeper.setCustomName("Bob");
    3. creeper.setCustomNameVisible(true);

    :) Hope my suggestion didn't come out rude, if so sorry
     
  21. Offline

    TeamJesus


    Code:java
    1. @Override
    2. public boolean onCommand(CommandSender sender, Command command, String label, final String[] args) {
    3. final Player p = (Player) sender;
    4. Creeper creeper = p.getWorld().spawn(p.getLocation(), Creeper.class);
    5. PetMaker.makePet(creeper, p);
    6. return false;
    7. }

    we have that as an example to spawn our creeper... now how to remove it?
     
  22. Offline

    bigteddy98

    remove what? the fact that it's following you?
     
  23. Offline

    TeamJesus

    ... makepet makes the pet, my question how to remove said pet... after doing a makepet... pritty simple question
     
  24. Offline

    Zupsub

    Use Entity#remove()?:confused:
     
    DevRosemberg likes this.
  25. Offline

    bigteddy98

    am I so stupid or what? If you want it to stop following you you will have to remove the mob and spawn a new one at his place.
     
  26. Offline

    SoThatsIt

     
  27. Offline

    ArthurMaker


    Dude, you studied Bukkit's API, didn't ya?
     
    Phasesaber, jpjunho and bigteddy98 like this.
  28. Offline

    MineCrypt

    You should update the example to show the use of UUID, instead of Player :)
     
  29. Offline

    bigteddy98

    I will put that together with the UUID example which I am going to update within an hour.
     
  30. Offline

    Quaro

    Code:java
    1. this.entity.getNavigation().b(false);

    What does this?
     
Thread Status:
Not open for further replies.

Share This Page