Package net.glowstone.entity.passive
Class GlowAbstractHorse
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>,org.bukkit.attribute.Attributable,org.bukkit.command.CommandSender,org.bukkit.entity.AbstractHorse,org.bukkit.entity.Ageable,org.bukkit.entity.Animals,org.bukkit.entity.Breedable,org.bukkit.entity.Creature,org.bukkit.entity.Damageable,org.bukkit.entity.Entity,org.bukkit.entity.LivingEntity,org.bukkit.entity.Mob,org.bukkit.entity.Tameable,org.bukkit.entity.Vehicle,org.bukkit.inventory.InventoryHolder,org.bukkit.loot.Lootable,org.bukkit.metadata.Metadatable,org.bukkit.Nameable,org.bukkit.permissions.Permissible,org.bukkit.permissions.ServerOperator,org.bukkit.persistence.PersistentDataHolder,org.bukkit.projectiles.ProjectileSource
- Direct Known Subclasses:
GlowChestedHorse,GlowHorse,GlowUndeadHorse
public abstract class GlowAbstractHorse
extends GlowTameable
implements org.bukkit.entity.AbstractHorse
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.Spigot -
Field Summary
Fields inherited from class net.glowstone.entity.GlowAgeable
height, widthFields inherited from class net.glowstone.entity.GlowLivingEntity
deathTicks, health, maxHealth, movement, speed, taskManagerFields inherited from class net.glowstone.entity.GlowEntity
active, airDrag, applyDragBeforeAccel, boundingBox, ENTITY_ID_NOBODY, entityId, gravityAccel, liquidDrag, location, metadata, passengerChanged, previousLocation, removed, server, slipMultiplier, teleported, ticksLived, vehicle, velocity, velocityChanged, world, worldLock -
Constructor Summary
ConstructorsConstructorDescriptionGlowAbstractHorse(org.bukkit.Location location, org.bukkit.entity.EntityType type, double maxHealth) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBreed()protected intcomputeDomestication(org.bukkit.Material food) Returns the amount to increment the domestication (progress toward taming) when the given food is consumed by an untamed adult mob, before applying the maximum domestication.protected intcomputeGrowthAmount(org.bukkit.Material material) Computes the growth amount using a specific material for the current ageable creature.List<com.flowpowered.network.Message>Creates a list ofMessages which can be sent to a client to spawn this entity.Set<org.bukkit.Material>Returns an immutable set containing the breeding foods for the current animal.intdoubleintorg.bukkit.entity.Horse.VariantbooleanisTamed()voidsetDomestication(int domestication) voidsetJumpStrength(double jumpStrength) voidsetMaxDomestication(int maxDomestication) voidsetTamed(boolean tamed) voidsetVariant(org.bukkit.entity.Horse.Variant variant) protected booleantryFeed(org.bukkit.Material food, GlowPlayer player) Determines whether this entity can eat an item while healthy, and if so, applies the effects of eating it.Methods inherited from class net.glowstone.entity.passive.GlowTameable
fireEntityTameEvent, getOwner, getOwnerUniqueId, isSitting, setOwner, setOwnerUniqueId, setSittingMethods inherited from class net.glowstone.entity.GlowAnimal
entityInteract, getAmbientDelay, getBreedCause, isLoveMode, setBreedCauseMethods inherited from class net.glowstone.entity.GlowAgeable
canGrow, createBaby, getAge, getAgeLock, getForcedAge, getLoveModeTicks, getParent, getSoundPitch, grow, isAdult, pulse, setAdult, setAge, setAgeLock, setBaby, setBreed, setForcedAge, setLoveModeTicks, setParent, setScale, setScaleForAgeMethods inherited from class net.glowstone.entity.GlowCreature
getLootTable, getPathfinder, getSeed, getTarget, getType, isInDaylight, setLootTable, setSeed, setTargetMethods inherited from class net.glowstone.entity.GlowLivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, canTakeDamage, clearActiveItem, clearActivePotionEffects, createUpdateMessage, damage, getAbsorptionAmount, getActiveItem, getActivePotionEffects, getAmbientSound, getArrowCooldown, getArrowsInBody, getArrowsStuck, getAttribute, getAttributeManager, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDeathTicks, getEquipment, getEquipmentMonitor, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaisedTime, getHeadYaw, getHealth, getHurtDirection, getHurtSound, getItemUseRemainingTime, getKiller, getLastDamage, getLastDamager, getLastTwoTargetBlocks, getLineOfSight, getMaxHealth, getMaximumAir, getMaximumNoDamageTicks, getMemory, getMovement, getNoDamageTicks, getPlayerDamageTick, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getSoundVolume, getSpeed, getState, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockInfo, getTargetEntity, getTargetEntityInfo, getTaskManager, getVelocityFromMovement, hasAI, hasLineOfSight, hasPotionEffect, isArthropod, isCollidable, isFallFlying, isGliding, isHandRaised, isInvisible, isJumping, isRiptiding, isSleeping, isSwimming, isUndead, isWithinSolidBlock, jump, launchProjectile, launchProjectile, launchProjectile, launchProjectile, playAnimation, playPickupItemAnimation, pulsePhysics, rayTraceBlocks, rayTraceBlocks, registerAttribute, removePotionEffect, reset, resetMaxHealth, setAbsorptionAmount, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setCanPickupItems, setCollidable, setFallFlying, setGliding, setHeadYaw, setHealth, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLastDamager, setMaxHealth, setMaximumAir, setMaximumNoDamageTicks, setMemory, setMovement, setNoDamageTicks, setOnGround, setPlayerDamageTick, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSpeed, setState, setSwimming, swingMainHand, swingOffHand, tryUseTotem, updatePotionEffectsMetadataMethods inherited from class net.glowstone.entity.GlowEntity
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, collide, createAfterSpawnMessage, customName, customName, damage, damage, damage, eject, equals, fromMobSpawner, getBoundingBox, getCardinalFacing, getChunk, getCustomName, getCustomTags, getDismountLocation, getEffectivePermissions, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getGravityAccel, getHeight, getLastDamageCause, getLeashedEntities, getLeashHolder, getLocation, getLocation, getMaxFireTicks, getMetadata, getMetadata, getMountLocation, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasDefaultLandingBehavior, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasPermission, hasPermission, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isGlowing, isInBubbleColumn, isInLava, isInMaterial, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isLeashed, isOnGround, isOp, isPermissionSet, isPermissionSet, isPersistent, isRemoved, isSilent, isTeleported, isTicking, isTouchingMaterial, isValid, isWithinDistance, isWithinDistance, leaveVehicle, playEffect, playEffectKnownAndSelf, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, sendMessage, sendMessage, sendMessage, sendMessage, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFriction, setGlowing, setGravity, setGravityAccel, setInvulnerable, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setOp, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, setRotation, setSilent, setSize, setTicksLived, setUniqueId, setVelocity, shouldSave, spigot, teleport, teleport, teleport, teleport, teleportToEnd, teleportToSpawn, toString, updateBoundingBoxMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.entity.AbstractHorse
getInventoryMethods inherited from interface org.bukkit.entity.Ageable
getAge, isAdult, setAdult, setAge, setBabyMethods inherited from interface org.bukkit.entity.Animals
getBreedCause, getLoveModeTicks, isLoveMode, setBreedCause, setLoveModeTicksMethods inherited from interface org.bukkit.attribute.Attributable
getAttribute, registerAttributeMethods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, hideBossBar, openBook, openBook, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, showBossBar, showTitle, stopSoundMethods inherited from interface org.bukkit.entity.Breedable
getAgeLock, setAgeLock, setBreedMethods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageMethods inherited from interface org.bukkit.entity.Damageable
damage, damage, damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealthMethods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInBubbleColumn, isInLava, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, spigot, teleport, teleport, teleport, teleport, teleportAsync, teleportAsyncMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getCanPickupItems, getCategory, getCollidableExemptions, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaisedTime, getHurtDirection, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, hasAI, hasLineOfSight, hasPotionEffect, isCollidable, isGliding, isHandRaised, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, playAnimation, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setCanPickupItems, setCollidable, setGliding, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingMainHand, swingOffHandMethods inherited from interface org.bukkit.loot.Lootable
clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setLootTable, setSeedMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.entity.Mob
getPathfinder, getTarget, isAware, isInDaylight, setAware, setTargetMethods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectileMethods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOpMethods inherited from interface org.bukkit.entity.Tameable
getOwner, getOwnerUniqueId, setOwnerMethods inherited from interface org.bukkit.entity.Vehicle
getVelocity, setVelocity
-
Constructor Details
-
GlowAbstractHorse
public GlowAbstractHorse(org.bukkit.Location location, org.bukkit.entity.EntityType type, double maxHealth)
-
-
Method Details
-
tryFeed
Description copied from class:GlowAnimalDetermines whether this entity can eat an item while healthy, and if so, applies the effects of eating it.- Overrides:
tryFeedin classGlowAnimal- Parameters:
food- an item that may be foodplayer- the player feeding the entity, for statistical purposes- Returns:
- true if the item should be consumed; false otherwise
-
createSpawnMessage
Description copied from class:GlowEntityCreates a list ofMessages which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.- Overrides:
createSpawnMessagein classGlowAgeable- Returns:
- A list of messages which can spawn this entity.
-
getVariant
public org.bukkit.entity.Horse.Variant getVariant()- Specified by:
getVariantin interfaceorg.bukkit.entity.AbstractHorse
-
setVariant
public void setVariant(org.bukkit.entity.Horse.Variant variant) - Specified by:
setVariantin interfaceorg.bukkit.entity.AbstractHorse
-
canBreed
public boolean canBreed()- Specified by:
canBreedin interfaceorg.bukkit.entity.Ageable- Specified by:
canBreedin interfaceorg.bukkit.entity.Breedable- Overrides:
canBreedin classGlowAgeable
-
getBreedingFoods
Description copied from class:GlowAnimalReturns an immutable set containing the breeding foods for the current animal.- Overrides:
getBreedingFoodsin classGlowAnimal- Returns:
- an immutable set containing Material
-
computeDomestication
protected int computeDomestication(org.bukkit.Material food) Returns the amount to increment the domestication (progress toward taming) when the given food is consumed by an untamed adult mob, before applying the maximum domestication. Zero is returned for any item this mob cannot eat.- Parameters:
food- the food to consume- Returns:
- the amount of domestication to gain
-
computeGrowthAmount
protected int computeGrowthAmount(org.bukkit.Material material) Description copied from class:GlowAgeableComputes the growth amount using a specific material for the current ageable creature. Always returns 0 for an adult or if the material is not food for the creature.- Overrides:
computeGrowthAmountin classGlowAnimal- Parameters:
material- The food used to compute the growth amount.- Returns:
- The age gained using the given food.
-
getDomestication
public int getDomestication()- Specified by:
getDomesticationin interfaceorg.bukkit.entity.AbstractHorse
-
setDomestication
public void setDomestication(int domestication) - Specified by:
setDomesticationin interfaceorg.bukkit.entity.AbstractHorse
-
getMaxDomestication
public int getMaxDomestication()- Specified by:
getMaxDomesticationin interfaceorg.bukkit.entity.AbstractHorse
-
setMaxDomestication
public void setMaxDomestication(int maxDomestication) - Specified by:
setMaxDomesticationin interfaceorg.bukkit.entity.AbstractHorse
-
getJumpStrength
public double getJumpStrength()- Specified by:
getJumpStrengthin interfaceorg.bukkit.entity.AbstractHorse
-
setJumpStrength
public void setJumpStrength(double jumpStrength) - Specified by:
setJumpStrengthin interfaceorg.bukkit.entity.AbstractHorse
-
isTamed
public boolean isTamed()- Specified by:
isTamedin interfaceorg.bukkit.entity.Tameable- Overrides:
isTamedin classGlowTameable
-
setTamed
public void setTamed(boolean tamed) - Specified by:
setTamedin interfaceorg.bukkit.entity.Tameable- Overrides:
setTamedin classGlowTameable
-