Package net.glowstone.entity.passive
Class GlowFirework
java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.passive.GlowFirework
- All Implemented Interfaces:
Summonable
,net.kyori.adventure.audience.Audience
,net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>
,org.bukkit.command.CommandSender
,org.bukkit.entity.Entity
,org.bukkit.entity.Firework
,org.bukkit.entity.Projectile
,org.bukkit.metadata.Metadatable
,org.bukkit.Nameable
,org.bukkit.permissions.Permissible
,org.bukkit.permissions.ServerOperator
,org.bukkit.persistence.PersistentDataHolder
-
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.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
ConstructorDescriptionGlowFirework
(org.bukkit.Location location) GlowFirework
(org.bukkit.Location location, UUID spawningEntity, org.bukkit.entity.LivingEntity boostedEntity, org.bukkit.inventory.ItemStack item) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionList<com.flowpowered.network.Message>
Creates a list ofMessage
s which can be sent to a client to spawn this entity.void
detonate()
boolean
org.bukkit.entity.LivingEntity
org.bukkit.inventory.ItemStack
Get the underlying firework item.org.bukkit.inventory.meta.FireworkMeta
int
The number of ticks before this fireworks rocket explodes.@Nullable org.bukkit.projectiles.ProjectileSource
org.bukkit.entity.EntityType
getType()
boolean
void
pulse()
Called every game cycle.protected void
void
setBounce
(boolean b) void
setFireworkItem
(org.bukkit.inventory.ItemStack item) Set the firework item of this firework entity.void
setFireworkMeta
(org.bukkit.inventory.meta.FireworkMeta fireworkMeta) void
setLifeTime
(int lifeTime) The number of ticks before this fireworks rocket explodes.void
setShooter
(@Nullable org.bukkit.projectiles.ProjectileSource shooter) void
setShotAtAngle
(boolean shotAtAngle) void
setSpawningEntity
(UUID spawningEntity) Methods inherited from class net.glowstone.entity.GlowEntity
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, collide, createAfterSpawnMessage, createUpdateMessage, customName, customName, damage, damage, damage, damage, eject, entityInteract, 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, reset, sendMessage, sendMessage, sendMessage, sendMessage, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFriction, setGlowing, setGravity, setGravityAccel, setInvulnerable, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setOnGround, setOp, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, setRotation, setSilent, setSize, setTicksLived, setUniqueId, setVelocity, shouldSave, spigot, teleport, teleport, teleport, teleport, teleportToEnd, teleportToSpawn, toString, updateBoundingBox
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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, stopSound
Methods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage
Methods 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, 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
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomName
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Constructor Details
-
GlowFirework
public GlowFirework(org.bukkit.Location location) -
GlowFirework
public GlowFirework(org.bukkit.Location location, UUID spawningEntity, org.bukkit.entity.LivingEntity boostedEntity, org.bukkit.inventory.ItemStack item) Creates an instance.- Parameters:
location
- the locationspawningEntity
- TODO: document this parameterboostedEntity
- TODO: document this parameteritem
- the firework rocket as an item
-
-
Method Details
-
getType
public org.bukkit.entity.EntityType getType()- Specified by:
getType
in interfaceorg.bukkit.entity.Entity
- Overrides:
getType
in classGlowEntity
-
createSpawnMessage
Description copied from class:GlowEntity
Creates a list ofMessage
s which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.- Specified by:
createSpawnMessage
in classGlowEntity
- Returns:
- A list of messages which can spawn this entity.
-
getFireworkMeta
public org.bukkit.inventory.meta.FireworkMeta getFireworkMeta()- Specified by:
getFireworkMeta
in interfaceorg.bukkit.entity.Firework
-
setFireworkMeta
public void setFireworkMeta(org.bukkit.inventory.meta.FireworkMeta fireworkMeta) - Specified by:
setFireworkMeta
in interfaceorg.bukkit.entity.Firework
-
getFireworkItem
public org.bukkit.inventory.ItemStack getFireworkItem()Get the underlying firework item.- Returns:
- The Firework ItemStack of this Firework entity, or a new Firework ItemStack
-
setFireworkItem
public void setFireworkItem(org.bukkit.inventory.ItemStack item) Set the firework item of this firework entity. If an empty ItemStack, or none of the type {Material.FIREWORK_ROCKET
} was given, a new Firework ItemStack will be created.- Parameters:
item
- FireWork Item this entity should use
-
detonate
public void detonate()- Specified by:
detonate
in interfaceorg.bukkit.entity.Firework
-
pulse
public void pulse()Description copied from class:GlowEntity
Called every game cycle. Subclasses should implement this to implement periodic functionality e.g. mob AI.- Overrides:
pulse
in classGlowEntity
-
pulsePhysics
protected void pulsePhysics()- Overrides:
pulsePhysics
in classGlowEntity
-
getShooter
@Nullable public @Nullable org.bukkit.projectiles.ProjectileSource getShooter()- Specified by:
getShooter
in interfaceorg.bukkit.entity.Projectile
-
setShooter
public void setShooter(@Nullable @Nullable org.bukkit.projectiles.ProjectileSource shooter) - Specified by:
setShooter
in interfaceorg.bukkit.entity.Projectile
-
doesBounce
public boolean doesBounce()- Specified by:
doesBounce
in interfaceorg.bukkit.entity.Projectile
-
setBounce
public void setBounce(boolean b) - Specified by:
setBounce
in interfaceorg.bukkit.entity.Projectile
-
getSpawningEntity
- Specified by:
getSpawningEntity
in interfaceorg.bukkit.entity.Firework
-
setSpawningEntity
-
getBoostedEntity
public org.bukkit.entity.LivingEntity getBoostedEntity()- Specified by:
getBoostedEntity
in interfaceorg.bukkit.entity.Firework
-
isShotAtAngle
public boolean isShotAtAngle()- Specified by:
isShotAtAngle
in interfaceorg.bukkit.entity.Firework
-
setShotAtAngle
public void setShotAtAngle(boolean shotAtAngle) - Specified by:
setShotAtAngle
in interfaceorg.bukkit.entity.Firework
-
getLifeTime
public int getLifeTime()The number of ticks before this fireworks rocket explodes. -
setLifeTime
public void setLifeTime(int lifeTime) The number of ticks before this fireworks rocket explodes.
-