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 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
Metodi
Link to metodi
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();
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome commandString | Tipo string | Ha Getter sì | Ha Setter no |
Nome nome | Tipo string | Ha Getter sì | Ha Setter no |
Nome registryName | Tipo ResourceLocation | Ha Getter sì | Ha Setter no |
Nome requestedItems | Tipo Set<ItemDefinition> | Ha Getter sì | Ha Setter no |
Nome secondaryPoi | Tipo Set<Block> | Ha Getter sì | Ha Setter no |
Nome workSound | Tipo SoundEvent? | Ha Getter sì | Ha Setter no |