AbstractVillager

Link to abstractvillager

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;

已实现的接口

Link to 已实现的接口

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

Return Type: void

ZenScript
Copy
// AbstractVillager.playCelebrateSound() as void

myAbstractVillager.playCelebrateSound();

Link to setUnhappyCounter

Name: setUnhappyCounter

Return Type: void

ZenScript
Copy
AbstractVillager.setUnhappyCounter(unhappyCounter as int) as void
参数类型描述
参数
unhappyCounter
类型
int
描述
No Description Provided
名称类型可获得可设置描述
名称
isTrading
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
unhappyCounter
类型
int
可获得
true
可设置
true
描述
No Description Provided