VillagerTypeHelper

public final class VillagerTypeHelper

Utilities related to the creation of VillagerTypes. Not to be confused with a VillagerProfession, a villager type defines the appearance of a villager.

Creation and registration of custom villager types may be done by using register.

Creation and registration of a villager type does not guarantee villagers of a specific type will be created in a world. Typically the villager type is bound to a specific group of biomes. To allow a villager type to be spawned in a specific biome, use addVillagerTypeToBiome.

The texture used for the appearance of the villager is located at {@code assets/IDENTIFIER_NAMESPACE/textures/entity/villager/type/IDENTIFIER_PATH.png}.

Functions

addVillagerTypeToBiome
Link copied to clipboard
static void addVillagerTypeToBiome(RegistryKey<Biome> biomeKey, VillagerType villagerType)
Sets the biome a villager type can spawn in.
register
Link copied to clipboard
static VillagerType register(Identifier id)
Creates and registers a new villager type.

Sources

jvm source
Link copied to clipboard