Interface Animal
- All Superinterfaces:
Ageable, Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Mob, SchedulerSource, Sound.Emitter, Sound.Source.Provider
An animal that breeds: fed its food, it falls in love and looks for a partner of its kind, and
the two have a baby.
Like every entity, change it from the region thread owning its chunk.
- Since:
- 0.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHow long an animal stays in love, in ticks.Fields inherited from interface Ageable
BABY_START_AGE -
Method Summary
Modifier and TypeMethodDescriptionintReturns how many ticks this animal stays in love,0if it is not.booleanReturnstrueif this animal eats an item.booleanisInLove()Returnstruewhile this animal is in love and looks for a partner.booleanReturnstruewhile this animal runs away from what hurt it.Returns the player who made this animal fall in love last,nullif unknown.voidMakes this animal stop looking for a partner.voidMakes this animal fall in love for 600 ticks, hearts rising above it.Methods inherited from interface Ageable
age, isAgeLocked, isBaby, setAge, setAgeLocked, setBabyMethods inherited from interface Entity
chunk, displayName, entityId, isRemoved, location, remove, server, teleport, teleport, teleport, type, uuid, worldMethods inherited from interface HoverEventSource
asHoverEvent, asHoverEventMethods inherited from interface LivingEntity
absorptionAmount, activeEffects, addEffect, armor, armorToughness, clearEffects, damage, effect, equipment, fireTicks, hasEffect, headYaw, heal, health, isAlive, isDead, kill, knockbackResistance, maxHealth, removeEffect, setAbsorptionAmount, setFireTicks, setHeadYaw, setHealthMethods inherited from interface Mob
attackDamage, behaviour, behaviours, definition, distanceSqTo, followRange, goals, hasLineOfSightTo, height, lookAt, lookAt, movementSpeed, navigateTo, navigation, nearestPlayer, onGround, playSound, setFollowRange, setMoveSpeed, setTarget, setVelocity, target, velocityX, velocityY, velocityZ, widthMethods inherited from interface SchedulerSource
execute, execute, executeDelayed, executeDelayed, isOwnedByCurrentThreadMethods inherited from interface Sound.Source.Provider
soundSource
-
Field Details
-
LOVE_TICKS
static final int LOVE_TICKSHow long an animal stays in love, in ticks.- Since:
- 0.1.0
- See Also:
-
-
Method Details
-
isFood
Returnstrueif this animal eats an item.: fed to it, the item makes it fall in love or a baby grow up faster- Parameters:
stack- the item- Returns:
trueif this animal eats an item- Since:
- 0.1.0
-
isInLove
boolean isInLove()Returnstruewhile this animal is in love and looks for a partner.- Returns:
truewhile this animal is in love and looks for a partner- Since:
- 0.1.0
-
inLoveTime
int inLoveTime()Returns how many ticks this animal stays in love,0if it is not.- Returns:
- how many ticks this animal stays in love,
0if it is not - Since:
- 0.1.0
-
setInLove
-
resetLove
void resetLove()Makes this animal stop looking for a partner.- Since:
- 0.1.0
-
loveCause
-
isPanicking
boolean isPanicking()Returnstruewhile this animal runs away from what hurt it.; it breeds with no one meanwhile- Returns:
truewhile this animal runs away from what hurt it- Since:
- 0.1.0
-