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 Copyimport 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
Methods
Link to methods
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();
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name commandString | Type string | Has Getter true | Has Setter false |
Name name | Type string | Has Getter true | Has Setter false |
Name registryName | Type ResourceLocation | Has Getter true | Has Setter false |
Name requestedItems | Type Set<ItemDefinition> | Has Getter true | Has Setter false |
Name secondaryPoi | Type Set<Block> | Has Getter true | Has Setter false |
Name workSound | Type SoundEvent? | Has Getter true | Has Setter false |