Animal
Link to animal
Importing the class
Link to importing-the-class
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.animal.Animal;
Extending AgeableMob
Link to extending-ageablemob
Animal extends AgeableMob. That means all methods available in AgeableMob are also available in Animal
Methods
Link to methods
Name: canMate
Return Type: boolean
ZenScript CopyAnimal.canMate(other as Animal) as boolean
Parameter | Type |
---|---|
Parameter other | Type Animal |
Name: finalizeSpawnChildFromBreeding
ZenScript CopyAnimal.finalizeSpawnChildFromBreeding(level as ServerLevel, otherParent as Animal, child as AgeableMob?)
Parameter | Type |
---|---|
Parameter level | Type ServerLevel |
Parameter otherParent | Type Animal |
Parameter child | Type AgeableMob? |
Name: isFood
Return Type: boolean
ZenScript CopyAnimal.isFood(stack as ItemStack) as boolean
Parameter | Type |
---|---|
Parameter stack | Type ItemStack |
Name: resetLove
ZenScript Copy// Animal.resetLove()
myAnimal.resetLove();
Name: setInLove
ZenScript CopyAnimal.setInLove(loveCause as Player?)
Parameter | Type | Optional |
---|---|---|
Parameter loveCause | Type Player? | Optional true |
Name: spawnChildFromBreeding
ZenScript CopyAnimal.spawnChildFromBreeding(level as ServerLevel, otherParent as Animal)
Parameter | Type |
---|---|
Parameter level | Type ServerLevel |
Parameter otherParent | Type Animal |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name canFAllInLove | Type boolean | Has Getter true | Has Setter false |
Name inLoveTime | Type Animal | Has Getter true | Has Setter true |
Name isInLove | Type boolean | Has Getter true | Has Setter false |
Name loveCause | Type ServerPlayer? | Has Getter true | Has Setter false |