Enum Villager.Career

    • Enum Constant Detail

      • FARMER

        public static final Villager.Career FARMER
        Farmers primarily trade for food-related items.
      • FISHERMAN

        public static final Villager.Career FISHERMAN
        Fisherman primarily trade for fish, as well as possibly selling string and/or coal.
      • SHEPHERD

        public static final Villager.Career SHEPHERD
        Shepherds primarily trade for wool items, and shears.
      • FLETCHER

        public static final Villager.Career FLETCHER
        Fletchers primarily trade for string, bows, and arrows.
      • LIBRARIAN

        public static final Villager.Career LIBRARIAN
        Librarians primarily trade for paper, books, and enchanted books.
      • CARTOGRAPHER

        public static final Villager.Career CARTOGRAPHER
        Cartographers primarily trade for explorer maps and some paper.
      • CLERIC

        public static final Villager.Career CLERIC
        Clerics primarily trade for rotten flesh, gold ingot, redstone, lapis, ender pearl, glowstone, and bottle o' enchanting.
      • ARMORER

        public static final Villager.Career ARMORER
        Armorers primarily trade for iron armor, chainmail armor, and sometimes diamond armor.
      • WEAPON_SMITH

        public static final Villager.Career WEAPON_SMITH
        Weapon smiths primarily trade for iron and diamond weapons, sometimes enchanted.
      • TOOL_SMITH

        public static final Villager.Career TOOL_SMITH
        Tool smiths primarily trade for iron and diamond tools.
      • BUTCHER

        public static final Villager.Career BUTCHER
        Butchers primarily trade for raw and cooked food.
      • LEATHERWORKER

        public static final Villager.Career LEATHERWORKER
        Leatherworkers primarily trade for leather, and leather armor, as well as saddles.
      • NITWIT

        public static final Villager.Career NITWIT
        Nitwit villagers do not do anything. They do not have any trades by default.
    • Method Detail

      • values

        public static Villager.Career[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Villager.Career c : Villager.Career.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Villager.Career valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getCareers

        public static List<Villager.Career> getCareers​(Villager.Profession profession)
        Get an immutable list of Villager.Careers that can be used with a given Villager.Profession
        Parameters:
        profession - the profession to get careers for
        Returns:
        an immutable list of Careers that can be used by a profession, or an empty map if the profession was not found