Package org.bukkit.entity
Interface Fireball
- All Superinterfaces:
Audience,CommandSender,DataComponentView,Entity,Explosive,HoverEventSource<HoverEvent.ShowEntity>,Metadatable,Nameable,Permissible,PersistentDataHolder,PersistentDataViewHolder,Pointered,Projectile,ServerOperator,Sound.Emitter
- All Known Subinterfaces:
AbstractWindCharge,BreezeWindCharge,DragonFireball,LargeFireball,SizedFireball,SmallFireball,WindCharge,WitherSkull
Represents a Fireball.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot -
Method Summary
Modifier and TypeMethodDescription@NotNull VectorRetrieve the acceleration of this fireball.@NotNull VectorDeprecated.@NotNull VectorgetPower()Deprecated.Use #getAcceleration instead.voidsetAcceleration(@NotNull Vector acceleration) Sets the acceleration of the fireball.voidsetDirection(@NotNull Vector direction) Sets the direction the fireball should be flying towards.voidDeprecated.use #setAcceleration(Vector) instead.Methods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, closeDialog, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showDialog, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.command.CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface io.papermc.paper.datacomponent.DataComponentView
getData, getDataOrDefault, hasDataMethods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, broadcastHurtAnimation, collidesAt, copy, copy, createSnapshot, eject, fromMobSpawner, getAsString, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPickItemStack, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getRider, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getVisualFire, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasNoPhysics, hasRider, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isImmuneToFire, isInBubbleColumn, isInDaylight, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvisible, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isRidable, isRidableInWater, isSilent, isSneaking, isTicking, isTrackedBy, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, lookAt, lookAt, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setImmuneToFire, setInvisible, setInvulnerable, setLastDamageCause, setNoPhysics, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface org.bukkit.entity.Explosive
getYield, isIncendiary, setIsIncendiary, setYieldMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods 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, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.entity.Projectile
canHitEntity, doesBounce, getOwnerUniqueId, getShooter, hasBeenShot, hasLeftShooter, hitEntity, hitEntity, setBounce, setHasBeenShot, setHasLeftShooter, setShooterMethods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Method Details
-
setDirection
Sets the direction the fireball should be flying towards.
This is a convenience method, it will change the velocity direction and acceleration direction, while keeping the power the same.
Note: This method only uses the direction of the vector and will normalize (a copy of) it.
Special Case: When the given direction iszero, the velocity and acceleration will also be set to zero without keeping the power.- Parameters:
direction- the direction this fireball should be flying towards- See Also:
-
getDirection
Deprecated.badly named method, returns the value ofgetAcceleration()Retrieve the direction this fireball is heading toward. The returned vector is not normalized.- Returns:
- the direction
- See Also:
-
setAcceleration
Sets the acceleration of the fireball. The acceleration gets applied to the velocity every tick, depending on the specific type of the fireball a damping / drag factor is applied so that the velocity does not grow into infinity.
Note: that the client may not respect non-default acceleration power and will therefore mispredict the location of the fireball, causing visual stutter.- Parameters:
acceleration- the acceleration
-
getAcceleration
Retrieve the acceleration of this fireball.- Returns:
- the acceleration
-
setPower
Deprecated.use #setAcceleration(Vector) instead.Sets the power of a fireball. The power determines the direction and magnitude of its acceleration.- Parameters:
power- the power
-
getPower
Deprecated.Use #getAcceleration instead.Gets the power of a fireball. The power determines the direction and magnitude of its acceleration.- Returns:
- the power
-
getAcceleration()