AbstractVillager
Link to abstractvillager
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.entity.type.villager.AbstractVillager;
Interfacce Implementate
Link to interfacce-implementate
AbstractVillager implements the following interfaces. That means all methods defined in these interfaces are also available in AbstractVillager
Metodi
Link to metodi
Name: getUnhappyCounter
Return Type: int
ZenScript Copy// AbstractVillager.getUnhappyCounter() as int
myAbstractVillager.getUnhappyCounter();
Name: isTrading
Return Type: boolean
ZenScript Copy// AbstractVillager.isTrading() as boolean
myAbstractVillager.isTrading();
Name: playCelebrateSound
ZenScript Copy// AbstractVillager.playCelebrateSound()
myAbstractVillager.playCelebrateSound();
Name: setUnhappyCounter
ZenScript CopyAbstractVillager.setUnhappyCounter(unhappyCounter as int)
Parametro | Tipo |
---|---|
Parametro unhappyCounter | Tipo int |
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome isTrading | Tipo boolean | Ha Getter sì | Ha Setter no |
Nome unhappyCounter | Tipo int | Ha Getter sì | Ha Setter sì |