public interface Ageable extends Creature
限定符和类型 | 方法和说明 |
---|---|
boolean |
canBreed()
返回动物是否具有繁殖能力.
|
int |
getAge()
获取这只动物的年龄.
|
boolean |
getAgeLock()
获取这个动物的年龄是否被锁定.
|
boolean |
isAdult()
获取这个动物是否成年.
|
void |
setAdult()
设置这只动物为成年状态.
|
void |
setAge(int age)
设置这只动物的年龄.
|
void |
setAgeLock(boolean lock)
锁定这只动物的年龄,设置这个将防止动物从长成以准备进行交配.
|
void |
setBaby()
设置这只动物为年幼状态.
|
void |
setBreed(boolean breed)
设置动物是否具有繁殖能力,如果动物是年幼的设置此将立即长大.
|
addPotionEffect, addPotionEffect, addPotionEffects, getActivePotionEffects, getCanPickupItems, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, hasAI, hasLineOfSight, hasPotionEffect, isCollidable, isGliding, isLeashed, removePotionEffect, setAI, setCanPickupItems, setCollidable, setGliding, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway
getAttribute
damage, damage, getHealth, getMaxHealth, resetMaxHealth, setHealth, setMaxHealth
addPassenger, addScoreboardTag, eject, getEntityId, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPortalCooldown, setSilent, setTicksLived, setVelocity, teleport, teleport, teleport, teleport
getMetadata, hasMetadata, removeMetadata, setMetadata
getName, sendMessage, sendMessage
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
isOp, setOp
getCustomName, setCustomName
launchProjectile, launchProjectile
int getAge()
原文: Gets the age of this animal.
void setAge(int age)
原文: Sets the age of this animal.
age
- 新的年龄void setAgeLock(boolean lock)
原文: Lock the age of the animal, setting this will prevent the animal from maturing or getting ready for mating.
lock
- 是否锁定boolean getAgeLock()
原文: Gets the current agelock.
void setBaby()
原文: Sets the age of the animal to a baby
void setAdult()
原文: Sets the age of the animal to an adult
boolean isAdult()
原文: Returns true if the animal is an adult.
boolean canBreed()
原文: Return the ability to breed of the animal.
void setBreed(boolean breed)
原文: Set breedability of the animal, if the animal is a baby and set to breed it will instantly grow up.
breed
- 动物是否具有繁殖能力