Babymobs as Pets

Discussion in 'Plugin Development' started by lobnews, Mar 28, 2013.

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

    lobnews

    I want to make a Plugin which can spawn Babymobs and tame they instantly. This mobs should be:
    - babyzombie
    - all babyanimal
    - bat
    - silverfish
    They can't be attac and don't attac. They only follow the Player who has conjured them.
    I hope for a quick answer. And excuse my english I came from Germany.
     
  2. Offline

    skipperguy12

    Ok....so try to make it? Where's your question?

    I'd start at spawning a zombie, set it as a baby, spawn a pig, and set it's passenger to the zombie
     
    GodzOfMadness likes this.
  3. Offline

    Ivan

    Don't forget to listen to the PlayerTeleportEvent so it would follow you through the world.
     
  4. Offline

    lobnews

  5. Offline

    soulbrander

    lobnews Learn some java?? Anyway,

    Code:
    @EventHandler
    public void onPlayerTP(PlayerTeleportEvent e)
    {
        //Code to get the player's pet, and teleport him aswell goes here.
    }
    Oh, and remember to register that event listener.
     
  6. Offline

    lobnews

    I don't meen the EventHandler I can write and use them. I meen to spawn and set passenger.
     
  7. Offline

    CreeperShift

    Try something like this? :

    Code:
    Entity A = player.getWorld().spawnEntity(location, EntityType.PIG);
        A.setPassenger(A.getWorld().spawnEntity(location, EntityType.BAT));
    (untested)
     
  8. Offline

    lobnews

    I want to set a passenger to the player who used this command. Zombies and Cows for example go away from me.
     
  9. Offline

    RingOfStorms

    Why a pig? :confused: they dont follow or do anything like that.

    What I would do is use a wolf, then just like disguise craft disguise it as whatever mob you want the pet to be. This would be using packets and such.

    Spawn wolf, tame wolf to player, destroy entity packet of the wold, entity spawn packet, link the spawned entity to the wolf my syncing the entity id's and such so that the client tracks the correct movements.
     
  10. Offline

    lobnews

    This is my first Plugin in this way. Please can you write a little bit of code?
     
  11. what --"? please follow some basic tutorials, write some code urself and come back later
     
  12. Offline

    RingOfStorms

    Search it up, there are many tutorials that are nms related, maybe not for this exact matter but they will teach you how to use packets and such.
     
  13. Offline

    lobnews

    Ok, ok. I only ask because I don't work whith it before.
     
Thread Status:
Not open for further replies.

Share This Page