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;

Name: getName

Return Type: string

ZenScript
Copy
// VillagerProfession.getName() as string

myVillagerProfession.getName();

Link to getRequestedItems

Name: getRequestedItems

Return Type: Set<ItemDefinition>

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

myVillagerProfession.getRequestedItems();

Name: getSecondaryPoi

Return Type: Set<Block>

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

myVillagerProfession.getSecondaryPoi();

Name: getWorkSound

Return Type: SoundEvent?

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

myVillagerProfession.getWorkSound();
NomeTipoHa GetterHa Setter
Nome
commandString
Tipo
string
Ha Getter
Ha Setter
no
Nome
nome
Tipo
string
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