Audience
, CommandSender
, Entity
, HoverEventSource<HoverEvent.ShowEntity>
, Metadatable
, Nameable
, Permissible
, PersistentDataHolder
, Projectile
, ServerOperator
public interface FishHook extends Projectile
Modifier and Type | Interface | Description |
---|---|---|
static class |
FishHook.HookState |
Represents a state in which a fishing hook may be.
|
Entity.Spigot
Modifier and Type | Method | Description |
---|---|---|
boolean |
getApplyLure() |
Get whether the lure enchantment should be applied to reduce the wait
time.
|
double |
getBiteChance() |
Deprecated.
has no effect in newer Minecraft versions
|
@Nullable Entity |
getHookedEntity() |
Get the entity hooked by this fish hook.
|
int |
getMaxWaitTime() |
Get the maximum number of ticks one has to wait for a fish biting.
|
int |
getMinWaitTime() |
Get the minimum number of ticks one has to wait for a fish biting.
|
@NotNull FishHook.HookState |
getState() |
Get the current state of this fish hook.
|
boolean |
isInOpenWater() |
Check whether or not this fish hook is in open water.
|
boolean |
pullHookedEntity() |
Pull the hooked entity to the caster of this fish hook.
|
void |
setApplyLure(boolean applyLure) |
Set whether the lure enchantment should be applied to reduce the wait
time.
|
void |
setBiteChance(double chance) |
Deprecated.
has no effect in newer Minecraft versions
|
void |
setHookedEntity(@Nullable Entity entity) |
Set the entity hooked by this fish hook.
|
void |
setMaxWaitTime(int maxWaitTime) |
Set the maximum number of ticks one has to wait for a fish biting.
|
void |
setMinWaitTime(int minWaitTime) |
Set the minimum number of ticks one has to wait for a fish biting.
|
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
getName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage
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
asHoverEvent
getMetadata, hasMetadata, removeMetadata, setMetadata
customName, customName, getCustomName, setCustomName
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
getPersistentDataContainer
doesBounce, getShooter, setBounce, setShooter
isOp, setOp
int getMinWaitTime()
The default is 100 ticks (5 seconds).
Note that this is before applying lure.
void setMinWaitTime(int minWaitTime)
The default is 100 ticks (5 seconds).
Note that this is before applying lure.
minWaitTime
- Minimum number of ticks one has to wait for a fish
bitingint getMaxWaitTime()
The default is 600 ticks (30 seconds).
Note that this is before applying lure.
void setMaxWaitTime(int maxWaitTime)
The default is 600 ticks (30 seconds).
Note that this is before applying lure.
maxWaitTime
- Maximum number of ticks one has to wait for a fish
bitingboolean getApplyLure()
The default is true.
Lure reduces the wait time by 100 ticks (5 seconds) for each level of the
enchantment.
void setApplyLure(boolean applyLure)
The default is true.
Lure reduces the wait time by 100 ticks (5 seconds) for each level of the
enchantment.
applyLure
- Whether the lure enchantment should be applied to reduce
the wait time@Deprecated double getBiteChance()
0.0 = No Chance.
1.0 = Instant catch.
@Deprecated void setBiteChance(double chance) throws IllegalArgumentException
0.0 = No Chance.
1.0 = Instant catch.
chance
- the bite chanceIllegalArgumentException
- if the bite chance is not between 0
and 1boolean isInOpenWater()
Open water is defined by a 5x4x5 area of water, air and lily pads. If in open water, treasure items may be caught.
@Nullable @Nullable Entity getHookedEntity()
void setHookedEntity(@Nullable @Nullable Entity entity)
entity
- the entity to set, or null to unhookboolean pullHookedEntity()
@NotNull @NotNull FishHook.HookState getState()
Copyright © 2021. All rights reserved.