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
Copy
import 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

Link to getUnhappyCounter

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();

Link to playCelebrateSound

Name: playCelebrateSound

ZenScript
Copy
// AbstractVillager.playCelebrateSound()

myAbstractVillager.playCelebrateSound();

Link to setUnhappyCounter

Name: setUnhappyCounter

ZenScript
Copy
AbstractVillager.setUnhappyCounter(unhappyCounter as int)
ParametroTipo
Parametro
unhappyCounter
Tipo
int
NomeTipoHa GetterHa Setter
Nome
isTrading
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
unhappyCounter
Tipo
int
Ha Getter
Ha Setter