spawn a villager and setProfession, Profession will be reset to NONE next tick

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • 1.20.1
    • Yes

      Villager villager = loc.getWorld().spawn(Villager.class)
      villager.setProfession(Profession.LIBRARIAN);
      
      System.out.println(villager.getProfession());  // LIBRARIAN
      Bukkit.getScheduler().runTaskLater(plugin, () -> System.out.println(villager.getProfession()), 1);  // NONE
      

            Assignee:
            Unassigned
            Reporter:
            Rothes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: