VillagerProfessionBuilder

public final class VillagerProfessionBuilder

Allows for the creation of new VillagerProfessions.

The texture for the villagers are located at assets/IDENTIFIER_NAMESPACE/textures/entity/villager/profession/IDENTIFIER_PATH.png

A corresponding IDENTIFIER_PATH.mcmeta file exits in the same directory to define properties such as the HatType this profession would use.

Note this does not register any trades to these villagers. To register trades, add a new entry with your profession as the key to PROFESSION_TO_LEVELED_TRADE.

Functions

build
Link copied to clipboard
VillagerProfession build()
Creates the VillagerProfession.
create
Link copied to clipboard
static VillagerProfessionBuilder create()
Creates a builder instance to allow for creation of a VillagerProfession.
harvestableItems
Link copied to clipboard
VillagerProfessionBuilder harvestableItems(Iterable<Item> items)
Items that a Villager may harvest in this profession.
VillagerProfessionBuilder harvestableItems(Array<Item> items)
Items that a Villager may harvest in this profession.
id
Link copied to clipboard
VillagerProfessionBuilder id(Identifier id)
The Identifier used to identify this villager profession.
secondaryJobSites
Link copied to clipboard
VillagerProfessionBuilder secondaryJobSites(Iterable<Block> blocks)
A collection of blocks blocks which may suffice as a secondary job site for a Villager.
VillagerProfessionBuilder secondaryJobSites(Array<Block> blocks)
A collection of blocks blocks which may suffice as a secondary job site for a Villager.
workSound
Link copied to clipboard
VillagerProfessionBuilder workSound(@Nullable() SoundEvent workSoundEvent)
Provides the sound made when a Villager works.
workstation
Link copied to clipboard
VillagerProfessionBuilder workstation(PointOfInterestType type)
The PointOfInterestType the Villager of this profession will search for when finding a workstation.

Sources

jvm source
Link copied to clipboard