VillagerProfession

Link to villagerprofession

Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.villager.VillagerProfession;

Extending Record

Link to extending-record

VillagerProfession extends Record. That means all methods available in Record are also available in VillagerProfession

Name: getRegistryName

Return Type: ResourceLocation

ZenScript
Copy
// VillagerProfession.getRegistryName() as ResourceLocation

myVillagerProfession.getRegistryName();

Name: name

Return Type: string

ZenScript
Copy
// VillagerProfession.name() as string

myVillagerProfession.name();

Name: requestedItems

Return Type: Set<ItemDefinition>

ZenScript
Copy
// VillagerProfession.requestedItems() as Set<ItemDefinition>

myVillagerProfession.requestedItems();

Name: secondaryPoi

Return Type: Set<Block>

ZenScript
Copy
// VillagerProfession.secondaryPoi() as Set<Block>

myVillagerProfession.secondaryPoi();

Name: workSound

Return Type: SoundEvent?

ZenScript
Copy
// VillagerProfession.workSound() as SoundEvent?

myVillagerProfession.workSound();
NombreTypeHas GetterHas Setter
Nombre
commandString
Type
string
Has Getter
true
Has Setter
false
Nombre
name
Type
string
Has Getter
true
Has Setter
false
Nombre
registryName
Type
ResourceLocation
Has Getter
true
Has Setter
false
Nombre
requestedItems
Type
Set<ItemDefinition>
Has Getter
true
Has Setter
false
Nombre
secondaryPoi
Type
Set<Block>
Has Getter
true
Has Setter
false
Nombre
workSound
Type
SoundEvent?
Has Getter
true
Has Setter
false