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();
이름TypeHas GetterHas Setter
이름
commandString
Type
string
Has Getter
true
Has Setter
false
이름
name
Type
string
Has Getter
true
Has Setter
false
이름
registryName
Type
ResourceLocation
Has Getter
true
Has Setter
false
이름
requestedItems
Type
Set<ItemDefinition>
Has Getter
true
Has Setter
false
이름
secondaryPoi
Type
Set<Block>
Has Getter
true
Has Setter
false
이름
workSound
Type
SoundEvent?
Has Getter
true
Has Setter
false