How to spawn a zombie villager with a set profession

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

archiebaker

New Member
Jun 5, 2017
8
0
0
Hey guys


I've looked at the documentation, searched the forum.


I still can't find a way to spawn a zombie villager of a chosen profession, I was wondering if anyone has managed to do this and if so how.


Thankyou :emoji_slight_smile:
 
code_language.skript:
command /spawn:
    trigger:
        spawn a zombie villager
        add "{Profession:3}" to nbt of last spawned zombie villager

try it
 
maybe try this with skript-mirror (i think i have the skript-mirror syntax right it might be slightly off)
code_language.skript:
import "org.bukkit.entity.Villager" as {Villager}
spawn a zombie villager
set {_villager} to last spawned zombie villager
{_villager}.setVillagerProfession({Villager}.Profession.PRIEST);
 
Status
Not open for further replies.