IEntityAnimal
Link to ientityanimal
An Animal.
导入相关包
Link to 导入相关包
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.
import crafttweaker.entity.IEntityAnimal;
Extending
Link to extending-ientityageable
IEntityAnimal extends IEntityAgeable. That means all functions available to IEntities also are available to IEntityAnimal.
使用方式
Link to 使用方式
ZenGetters/Setters
Link to zengetterssetters
ZenGetter | 类型 |
---|---|
ZenGetter loveCause | 类型 IPlayer (Can be null!) |
ZenGetter isInLove | 类型 bool |
ZenMethods
Link to zenmethods
check if an item can be used to breed the animal
Link to check-if-an-item-can-be-used-to-breed-the-animal
Method expects an IItemStack.
Returns a bool.
ZenScript CopyentAnObj.isBreedingItem(IItemStack itemStack);
Set or Reset in love
Link to set-or-reset-in-love
First method expects an optional IPlayer object, second nothing.
Returns nothing.
ZenScript CopyentAnObj.setInLove(@Optional IPlayer player);
entAnObj.resetInLove();
Check if another animal can mate with this one.
Link to check-if-another-animal-can-mate-with-this-one
Method expects an IEntityAnimal object.
Returns a bool.
ZenScript CopyentAnObj.canMateWith(IEntityAnimal other);