Package net.glowstone.entity.passive
Class GlowFishingHook
java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.projectile.GlowProjectile
net.glowstone.entity.passive.GlowFishingHook
- All Implemented Interfaces:
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.FishHook,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.SpigotNested classes/interfaces inherited from interface org.bukkit.entity.FishHook
org.bukkit.entity.FishHook.HookState -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.flowpowered.network.Message[]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
ConstructorsConstructorDescriptionGlowFishingHook(org.bukkit.Location location, org.bukkit.inventory.ItemStack itemStack, org.bukkit.entity.Player angler) Creates a fishing bob. -
Method Summary
Modifier and TypeMethodDescriptionvoidcollide(org.bukkit.block.Block block) Collide with the target block.voidcollide(org.bukkit.entity.LivingEntity entity) List<com.flowpowered.network.Message>Creates a list ofMessages which can be sent to a client to spawn this entity.booleandoubleDeprecated.@NotNull org.bukkit.util.BoundingBox@NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReasonorg.bukkit.entity.Entityintintprotected int@NotNull org.bukkit.entity.FishHook.HookStategetState()booleanbooleanvoidpulse()Called every game cycle.voidreelIn()Removes this fishing hook.voidsetApplyLure(boolean applyLure) voidsetBiteChance(double v) Deprecated.voidsetHookedEntity(org.bukkit.entity.Entity entity) voidsetMaxWaitTime(int maxWaitTime) voidsetMinWaitTime(int minWaitTime) voidsetRotation(float yaw, float pitch) voidsetShooter(org.bukkit.projectiles.ProjectileSource shooter) booleanChecks whether this entity should be saved as part of the world.Methods inherited from class net.glowstone.entity.projectile.GlowProjectile
doesBounce, getOwner, getShooter, hasDefaultLandingBehavior, isGlowing, isInvulnerable, pulsePhysics, setBounce, setGlowing, setInvulnerable, setOwnerMethods inherited from class net.glowstone.entity.GlowEntity
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, createAfterSpawnMessage, createUpdateMessage, customName, customName, damage, damage, damage, damage, eject, entityInteract, equals, fromMobSpawner, getCardinalFacing, getChunk, getCustomName, getCustomTags, getDismountLocation, getEffectivePermissions, getEntityId, 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, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasPermission, hasPermission, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isInBubbleColumn, isInLava, isInMaterial, isInRain, isInsideVehicle, 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, setGravity, setGravityAccel, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setOnGround, setOp, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, setSilent, setSize, setTicksLived, setUniqueId, setVelocity, 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 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.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageMethods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, eject, fromMobSpawner, getChunk, getEntityId, 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, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport, teleportAsync, teleportAsyncMethods 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, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods inherited from interface org.bukkit.entity.Projectile
doesBounce, getShooter, setBounceMethods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Field Details
-
EMPTY_MESSAGE_ARRAY
public static final com.flowpowered.network.Message[] EMPTY_MESSAGE_ARRAY
-
-
Constructor Details
-
GlowFishingHook
public GlowFishingHook(org.bukkit.Location location, org.bukkit.inventory.ItemStack itemStack, org.bukkit.entity.Player angler) Creates a fishing bob.- Parameters:
location- the locationitemStack- the fishing rod (used to handle enchantments) or null (equivalent toangler- the player who is casting this fish hook (must be set at spawn time)
-
-
Method Details
-
setShooter
public void setShooter(org.bukkit.projectiles.ProjectileSource shooter) - Specified by:
setShooterin interfaceorg.bukkit.entity.Projectile- Overrides:
setShooterin classGlowProjectile
-
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 classGlowProjectile- Returns:
- A list of messages which can spawn this entity.
-
collide
public void collide(org.bukkit.block.Block block) Description copied from class:GlowEntityCollide with the target block.- Specified by:
collidein classGlowProjectile- Parameters:
block- a block whose typeMaterial.isOccluding()
-
collide
public void collide(org.bukkit.entity.LivingEntity entity) - Specified by:
collidein classGlowProjectile
-
getObjectId
protected int getObjectId()- Specified by:
getObjectIdin classGlowProjectile
-
shouldSave
public boolean shouldSave()Description copied from class:GlowEntityChecks whether this entity should be saved as part of the world.- Overrides:
shouldSavein classGlowEntity- Returns:
- True if the entity should be saved.
-
getBiteChance
Deprecated.- Specified by:
getBiteChancein interfaceorg.bukkit.entity.FishHook
-
setBiteChance
Deprecated.- Specified by:
setBiteChancein interfaceorg.bukkit.entity.FishHook- Throws:
IllegalArgumentException
-
isInOpenWater
public boolean isInOpenWater()- Specified by:
isInOpenWaterin interfaceorg.bukkit.entity.FishHook
-
getHookedEntity
public org.bukkit.entity.Entity getHookedEntity()- Specified by:
getHookedEntityin interfaceorg.bukkit.entity.FishHook
-
setHookedEntity
public void setHookedEntity(org.bukkit.entity.Entity entity) - Specified by:
setHookedEntityin interfaceorg.bukkit.entity.FishHook
-
pullHookedEntity
public boolean pullHookedEntity()- Specified by:
pullHookedEntityin interfaceorg.bukkit.entity.FishHook
-
getState
@NotNull public @NotNull org.bukkit.entity.FishHook.HookState getState()- Specified by:
getStatein interfaceorg.bukkit.entity.FishHook
-
pulse
public void pulse()Description copied from class:GlowEntityCalled every game cycle. Subclasses should implement this to implement periodic functionality e.g. mob AI.- Overrides:
pulsein classGlowEntity
-
reelIn
public void reelIn()Removes this fishing hook. Drops loot and xp if a player is fishing. -
getBoundingBox
@NotNull public @NotNull org.bukkit.util.BoundingBox getBoundingBox()- Specified by:
getBoundingBoxin interfaceorg.bukkit.entity.Entity- Overrides:
getBoundingBoxin classGlowEntity
-
setRotation
public void setRotation(float yaw, float pitch) - Specified by:
setRotationin interfaceorg.bukkit.entity.Entity- Overrides:
setRotationin classGlowEntity
-
getEntitySpawnReason
public @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason()- Specified by:
getEntitySpawnReasonin interfaceorg.bukkit.entity.Entity- Overrides:
getEntitySpawnReasonin classGlowEntity
-
getApplyLure
public boolean getApplyLure()- Specified by:
getApplyLurein interfaceorg.bukkit.entity.FishHook
-
getMinWaitTime
public int getMinWaitTime()- Specified by:
getMinWaitTimein interfaceorg.bukkit.entity.FishHook
-
setMinWaitTime
public void setMinWaitTime(int minWaitTime) - Specified by:
setMinWaitTimein interfaceorg.bukkit.entity.FishHook
-
getMaxWaitTime
public int getMaxWaitTime()- Specified by:
getMaxWaitTimein interfaceorg.bukkit.entity.FishHook
-
setMaxWaitTime
public void setMaxWaitTime(int maxWaitTime) - Specified by:
setMaxWaitTimein interfaceorg.bukkit.entity.FishHook
-
setApplyLure
public void setApplyLure(boolean applyLure) - Specified by:
setApplyLurein interfaceorg.bukkit.entity.FishHook
-