public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable
Modifier and Type | Interface and Description |
---|---|
static class |
Horse.Color
Represents the base color that the horse has.
|
static class |
Horse.Style
Represents the style, or markings, that the horse has.
|
static class |
Horse.Variant
Represents the different types of horses that may exist.
|
Modifier and Type | Method and Description |
---|---|
Horse.Color |
getColor()
Gets the horse's color.
|
int |
getDomestication()
Gets the domestication level of this horse.
|
HorseInventory |
getInventory()
Get the object's inventory.
|
double |
getJumpStrength()
Gets the jump strength of this horse.
|
int |
getMaxDomestication()
Gets the maximum domestication level of this horse.
|
Horse.Style |
getStyle()
Gets the horse's style.
|
Horse.Variant |
getVariant()
Gets the horse's variant.
|
boolean |
isCarryingChest()
Gets whether the horse has a chest equipped.
|
void |
setCarryingChest(boolean chest)
Sets whether the horse has a chest equipped.
|
void |
setColor(Horse.Color color)
Sets the horse's color.
|
void |
setDomestication(int level)
Sets the domestication level of this horse.
|
void |
setJumpStrength(double strength)
Sets the jump strength of this horse.
|
void |
setMaxDomestication(int level)
Sets the maximum domestication level of this horse.
|
void |
setStyle(Horse.Style style)
Sets the style of this horse.
|
void |
setVariant(Horse.Variant variant)
Sets the horse's variant.
|
canBreed, getAge, getAgeLock, isAdult, setAdult, setAge, setAgeLock, setBaby, setBreed
_INVALID_getLastDamage, _INVALID_setLastDamage, addPotionEffect, addPotionEffect, addPotionEffects, getActivePotionEffects, getCanPickupItems, getCustomName, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getNoDamageTicks, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, hasLineOfSight, hasPotionEffect, isCustomNameVisible, isLeashed, removePotionEffect, setCanPickupItems, setCustomName, setCustomNameVisible, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, shootArrow, throwEgg, throwSnowball
_INVALID_damage, _INVALID_damage, _INVALID_getHealth, _INVALID_getMaxHealth, _INVALID_setHealth, _INVALID_setMaxHealth, damage, damage, getHealth, getMaxHealth, resetMaxHealth, setHealth, setMaxHealth
eject, getEntityId, getFallDistance, getFireTicks, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWorld, isDead, isEmpty, isInsideVehicle, isOnGround, isValid, leaveVehicle, playEffect, remove, setFallDistance, setFireTicks, setLastDamageCause, setPassenger, setTicksLived, setVelocity, teleport, teleport, teleport, teleport
getMetadata, hasMetadata, removeMetadata, setMetadata
launchProjectile, launchProjectile
getVelocity, setVelocity
Horse.Variant getVariant()
A horse's variant defines its physical appearance and capabilities. Whether a horse is a regular horse, donkey, mule, or other kind of horse is determined using the variant.
Horse.Variant
representing the horse's variantvoid setVariant(Horse.Variant variant)
A horse's variant defines its physical appearance and capabilities. Whether a horse is a regular horse, donkey, mule, or other kind of horse can be set using the variant.
Setting a horse's variant does not change its attributes such as its owner and its tamed status, but changing a mule or donkey with a chest to another variant which does not support a chest will remove the chest and its contents.
variant
- a Horse.Variant
for this horseHorse.Color getColor()
Colors only apply to horses, not to donkeys, mules, skeleton horses or undead horses.
Horse.Color
representing the horse's groupvoid setColor(Horse.Color color)
Attempting to set a color for any donkey, mule, skeleton horse or undead horse will not result in a change.
color
- a Horse.Color
for this horseHorse.Style getStyle()
Styles only apply to horses, not to donkeys, mules, skeleton horses or undead horses.
Horse.Style
representing the horse's stylevoid setStyle(Horse.Style style)
Attempting to set a style for any donkey, mule, skeleton horse or undead horse will not result in a change.
style
- a Horse.Style
for this horseboolean isCarryingChest()
void setCarryingChest(boolean chest)
chest
- true if the horse should have a chestint getDomestication()
A higher domestication level indicates that the horse is closer to becoming tame. As the domestication level gets closer to the max domestication level, the chance of the horse becoming tame increases.
void setDomestication(int level)
Setting the domestication level to a high value will increase the horse's chances of becoming tame.
Domestication level must be greater than zero and no greater than
the max domestication level of the horse, determined with
getMaxDomestication()
level
- domestication levelint getMaxDomestication()
The higher this level is, the longer it will likely take for the horse to be tamed.
void setMaxDomestication(int level)
Setting a higher max domestication will increase the amount of domesticating (feeding, riding, etc.) necessary in order to tame it, while setting a lower max value will have the opposite effect.
Maximum domestication must be greater than zero.
level
- the max domestication leveldouble getJumpStrength()
Jump strength defines how high the horse can jump. A higher jump strength increases how high a jump will go.
void setJumpStrength(double strength)
A higher jump strength increases how high a jump will go. Setting a jump strength to 0 will result in no jump. You cannot set a jump strength to a value below 0 or above 2.
strength
- jump strength for this horseHorseInventory getInventory()
InventoryHolder
getInventory
in interface InventoryHolder
Copyright © 2015. All rights reserved.