public interface Mob extends LivingEntity, Lootable
Entity.Spigot
Modifier and Type | Method and Description |
---|---|
int |
getHeadRotationSpeed()
Gets the head rotation speed
|
int |
getMaxHeadPitch()
Gets the max head pitch rotation
|
Pathfinder |
getPathfinder()
Enables access to control the pathing of an Entity
|
@Nullable LivingEntity |
getTarget()
Gets the current target of this Mob
|
boolean |
isAware()
Gets whether this mob is aware of its surroundings.
|
boolean |
isInDaylight()
Check if this mob is exposed to daylight
|
void |
lookAt(double x,
double y,
double z)
Instruct this Mob to look at a specific position
|
void |
lookAt(double x,
double y,
double z,
float headRotationSpeed,
float maxHeadPitch)
Instruct this Mob to look at a specific position
|
void |
lookAt(@NotNull Entity entity)
Instruct this Mob to look at a specific Entity
|
void |
lookAt(@NotNull Entity entity,
float headRotationSpeed,
float maxHeadPitch)
Instruct this Mob to look at a specific Entity
|
void |
lookAt(Location location)
Instruct this Mob to look at a specific Location
|
void |
lookAt(Location location,
float headRotationSpeed,
float maxHeadPitch)
Instruct this Mob to look at a specific Location
|
void |
setAware(boolean aware)
Sets whether this mob is aware of its surroundings.
|
void |
setTarget(@Nullable LivingEntity target)
Instructs this Mob to set the specified LivingEntity as its target.
|
addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getCanPickupItems, getCategory, getCollidableExemptions, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaised, 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, hasLineOfSight, hasPotionEffect, isCollidable, isGliding, isHandRaised, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, 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, swingOffHand
getAttribute, registerAttribute
damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth
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, getVelocity, 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, setVelocity, spigot, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync
getMetadata, hasMetadata, removeMetadata, setMetadata
getName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage
audience, audience, clearTitle, empty, 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, stopSound, toAudience
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
isOp, setOp
customName, customName, getCustomName, setCustomName
getPersistentDataContainer
asHoverEvent, unbox
launchProjectile, launchProjectile
clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setLootTable, setSeed
@NotNull Pathfinder getPathfinder()
boolean isInDaylight()
void lookAt(@NotNull Location location)
Useful when implementing custom mob goals
location
- location to look atvoid lookAt(@NotNull Location location, float headRotationSpeed, float maxHeadPitch)
Useful when implementing custom mob goals
location
- location to look atheadRotationSpeed
- head rotation speedmaxHeadPitch
- max head pitch rotationvoid lookAt(@NotNull @NotNull Entity entity)
If a LivingEntity, look at eye location
Useful when implementing custom mob goals
entity
- entity to look atvoid lookAt(@NotNull @NotNull Entity entity, float headRotationSpeed, float maxHeadPitch)
If a LivingEntity, look at eye location
Useful when implementing custom mob goals
entity
- entity to look atheadRotationSpeed
- head rotation speedmaxHeadPitch
- max head pitch rotationvoid lookAt(double x, double y, double z)
Useful when implementing custom mob goals
x
- x coordinatey
- y coordinatez
- z coordinatevoid lookAt(double x, double y, double z, float headRotationSpeed, float maxHeadPitch)
Useful when implementing custom mob goals
x
- x coordinatey
- y coordinatez
- z coordinateheadRotationSpeed
- head rotation speedmaxHeadPitch
- max head pitch rotationint getHeadRotationSpeed()
int getMaxHeadPitch()
void setTarget(@Nullable @Nullable LivingEntity target)
Hostile creatures may attack their target, and friendly creatures may follow their target.
target
- New LivingEntity to target, or null to clear the target@Nullable @Nullable LivingEntity getTarget()
void setAware(boolean aware)
aware
- whether the mob is awareboolean isAware()
Copyright © 2022. All rights reserved.