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.Spigot
Nested classes/interfaces inherited from interface org.bukkit.entity.FishHook
org.bukkit.entity.FishHook.HookState
-
Field Summary
Modifier 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
ConstructorDescriptionGlowFishingHook
(org.bukkit.Location location, org.bukkit.inventory.ItemStack itemStack, org.bukkit.entity.Player angler) Creates a fishing bob. -
Method Summary
Modifier and TypeMethodDescriptionvoid
collide
(org.bukkit.block.Block block) Collide with the target block.void
collide
(org.bukkit.entity.LivingEntity entity) List<com.flowpowered.network.Message>
Creates a list ofMessage
s which can be sent to a client to spawn this entity.boolean
double
Deprecated.@NotNull org.bukkit.util.BoundingBox
@NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason
org.bukkit.entity.Entity
int
int
protected int
@NotNull org.bukkit.entity.FishHook.HookState
getState()
boolean
boolean
void
pulse()
Called every game cycle.void
reelIn()
Removes this fishing hook.void
setApplyLure
(boolean applyLure) void
setBiteChance
(double v) Deprecated.void
setHookedEntity
(org.bukkit.entity.Entity entity) void
setMaxWaitTime
(int maxWaitTime) void
setMinWaitTime
(int minWaitTime) void
setRotation
(float yaw, float pitch) void
setShooter
(org.bukkit.projectiles.ProjectileSource shooter) boolean
Checks 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, setOwner
Methods 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, 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, 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, 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.entity.Projectile
doesBounce, getShooter, setBounce
Methods 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:
setShooter
in interfaceorg.bukkit.entity.Projectile
- Overrides:
setShooter
in classGlowProjectile
-
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.- Overrides:
createSpawnMessage
in classGlowProjectile
- Returns:
- A list of messages which can spawn this entity.
-
collide
public void collide(org.bukkit.block.Block block) Description copied from class:GlowEntity
Collide with the target block.- Specified by:
collide
in classGlowProjectile
- Parameters:
block
- a block whose typeMaterial.isOccluding()
-
collide
public void collide(org.bukkit.entity.LivingEntity entity) - Specified by:
collide
in classGlowProjectile
-
getObjectId
protected int getObjectId()- Specified by:
getObjectId
in classGlowProjectile
-
shouldSave
public boolean shouldSave()Description copied from class:GlowEntity
Checks whether this entity should be saved as part of the world.- Overrides:
shouldSave
in classGlowEntity
- Returns:
- True if the entity should be saved.
-
getBiteChance
Deprecated.- Specified by:
getBiteChance
in interfaceorg.bukkit.entity.FishHook
-
setBiteChance
Deprecated.- Specified by:
setBiteChance
in interfaceorg.bukkit.entity.FishHook
- Throws:
IllegalArgumentException
-
isInOpenWater
public boolean isInOpenWater()- Specified by:
isInOpenWater
in interfaceorg.bukkit.entity.FishHook
-
getHookedEntity
public org.bukkit.entity.Entity getHookedEntity()- Specified by:
getHookedEntity
in interfaceorg.bukkit.entity.FishHook
-
setHookedEntity
public void setHookedEntity(org.bukkit.entity.Entity entity) - Specified by:
setHookedEntity
in interfaceorg.bukkit.entity.FishHook
-
pullHookedEntity
public boolean pullHookedEntity()- Specified by:
pullHookedEntity
in interfaceorg.bukkit.entity.FishHook
-
getState
@NotNull public @NotNull org.bukkit.entity.FishHook.HookState getState()- Specified by:
getState
in interfaceorg.bukkit.entity.FishHook
-
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
-
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:
getBoundingBox
in interfaceorg.bukkit.entity.Entity
- Overrides:
getBoundingBox
in classGlowEntity
-
setRotation
public void setRotation(float yaw, float pitch) - Specified by:
setRotation
in interfaceorg.bukkit.entity.Entity
- Overrides:
setRotation
in classGlowEntity
-
getEntitySpawnReason
public @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason()- Specified by:
getEntitySpawnReason
in interfaceorg.bukkit.entity.Entity
- Overrides:
getEntitySpawnReason
in classGlowEntity
-
getApplyLure
public boolean getApplyLure()- Specified by:
getApplyLure
in interfaceorg.bukkit.entity.FishHook
-
getMinWaitTime
public int getMinWaitTime()- Specified by:
getMinWaitTime
in interfaceorg.bukkit.entity.FishHook
-
setMinWaitTime
public void setMinWaitTime(int minWaitTime) - Specified by:
setMinWaitTime
in interfaceorg.bukkit.entity.FishHook
-
getMaxWaitTime
public int getMaxWaitTime()- Specified by:
getMaxWaitTime
in interfaceorg.bukkit.entity.FishHook
-
setMaxWaitTime
public void setMaxWaitTime(int maxWaitTime) - Specified by:
setMaxWaitTime
in interfaceorg.bukkit.entity.FishHook
-
setApplyLure
public void setApplyLure(boolean applyLure) - Specified by:
setApplyLure
in interfaceorg.bukkit.entity.FishHook
-