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.
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
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.
Try something like this? : Code: Entity A = player.getWorld().spawnEntity(location, EntityType.PIG); A.setPassenger(A.getWorld().spawnEntity(location, EntityType.BAT)); (untested)
I want to set a passenger to the player who used this command. Zombies and Cows for example go away from me.
Why a pig? 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.
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.