VillagerProfession

Link to villagerprofession

Importare la Classe

Link to importare-la-classe

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();
NomeTipoHa GetterHa Setter
Nome
commandString
Tipo
string
Ha Getter
Ha Setter
no
Nome
nome
Tipo
string
Ha Getter
Ha Setter
no
Nome
registryName
Tipo
ResourceLocation
Ha Getter
Ha Setter
no
Nome
requestedItems
Tipo
Set<ItemDefinition>
Ha Getter
Ha Setter
no
Nome
secondaryPoi
Tipo
Set<Block>
Ha Getter
Ha Setter
no
Nome
workSound
Tipo
SoundEvent?
Ha Getter
Ha Setter
no