接口 FishHook
- 所有超级接口:
CommandSender
,Entity
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,Projectile
,ServerOperator
原文: Represents a fishing hook.
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot
-
方法概要
修饰符和类型方法说明boolean
Get whether the lure enchantment should be applied to reduce the wait time.double
已过时。Minecraft新版本中已无效果Get the entity hooked by this fish hook.float
Get the maximum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.int
Get the maximum number of ticks one has to wait for a fish to bite after appearing.int
Get the maximum number of ticks one has to wait for a fish appearing.float
Get the minimum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.int
Get the minimum number of ticks one has to wait for a fish to bite after appearing.int
Get the minimum number of ticks one has to wait for a fish appearing.getState()
Get the current state of this fish hook.boolean
Check whether or not this fish hook is in open water.boolean
Whether or not wait and lure time will be impacted by rain.boolean
Whether or not wait and lure time will be impacted by direct sky access.boolean
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) 已过时。has no effect in newer Minecraft versionsvoid
setHookedEntity
(@Nullable Entity entity) Set the entity hooked by this fish hook.void
setLureAngle
(float min, float max) Set both the minimum (default 0) and maximum (default 360) angle of where a fish will appear after the wait time. 0 degrees is positive Z, 90 degrees is negative X.void
setLureTime
(int min, int max) Set both the minimum (default 20) and maximum (default 80) amount of ticks one has to wait for a fish to bite after appearing.void
setMaxLureAngle
(float maxLureAngle) Set the maximum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.void
setMaxLureTime
(int maxLureTime) Set the maximum number of ticks one has to wait for a fish to bite after appearing.void
setMaxWaitTime
(int maxWaitTime) Set the maximum number of ticks one has to wait for a fish appearing.void
setMinLureAngle
(float minLureAngle) Set the minimum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.void
setMinLureTime
(int minLureTime) Set the minimum number of ticks one has to wait for a fish to bite after appearing.void
setMinWaitTime
(int minWaitTime) Set the minimum number of ticks one has to wait for a fish appearing.void
setRainInfluenced
(boolean rainInfluenced) Set whether or not wait and lure time will be impacted by rain.void
setSkyInfluenced
(boolean skyInfluenced) Set whether or not wait and lure time will be impacted by direct sky access.void
setWaitTime
(int min, int max) Set both the minimum (default 100) and maximum (default 600) amount of ticks one has to wait for a fish appearing.从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage
从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spigot, teleport, teleport, teleport, teleport
从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
从接口继承的方法 org.bukkit.Nameable
getCustomName, setCustomName
从接口继承的方法 org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
从接口继承的方法 org.bukkit.entity.Projectile
doesBounce, getShooter, setBounce, setShooter
从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
getMinWaitTime
int getMinWaitTime()Get the minimum number of ticks one has to wait for a fish appearing.The default is 100 ticks (5 seconds).
Note that this is before applying lure.- 返回:
- Minimum number of ticks one has to wait for a fish appearing
-
setMinWaitTime
void setMinWaitTime(int minWaitTime) Set the minimum number of ticks one has to wait for a fish appearing.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 appearing
-
getMaxWaitTime
int getMaxWaitTime()Get the maximum number of ticks one has to wait for a fish appearing.The default is 600 ticks (30 seconds).
Note that this is before applying lure.- 返回:
- Maximum number of ticks one has to wait for a fish appearing
-
setMaxWaitTime
void setMaxWaitTime(int maxWaitTime) Set the maximum number of ticks one has to wait for a fish appearing.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 appearing
-
setWaitTime
void setWaitTime(int min, int max) Set both the minimum (default 100) and maximum (default 600) amount of ticks one has to wait for a fish appearing.- 参数:
min
- minimum ticks for a fish to appearmax
- maximum ticks for a fish to appear
-
getMinLureTime
int getMinLureTime()Get the minimum number of ticks one has to wait for a fish to bite after appearing.The default is 20 ticks (1 second).
Lure does not affect this value. This will also effect the radius (0.1 * lureTime) of where the fish will appear.- 返回:
- Minimum number of ticks one has to wait for a fish to bite
-
setMinLureTime
void setMinLureTime(int minLureTime) Set the minimum number of ticks one has to wait for a fish to bite after appearing.The default is 20 ticks (1 second).
Lure does not affect this value. This will also effect the radius (0.1 * lureTime) of where the fish will appear.- 参数:
minLureTime
- Minimum number of ticks one has to wait for a fish to bite
-
getMaxLureTime
int getMaxLureTime()Get the maximum number of ticks one has to wait for a fish to bite after appearing.The default is 80 ticks (4 second).
Lure does not affect this value. This will also effect the radius (0.1 * lureTime) of where the fish will appear.- 返回:
- Maximum number of ticks one has to wait for a fish to bite
-
setMaxLureTime
void setMaxLureTime(int maxLureTime) Set the maximum number of ticks one has to wait for a fish to bite after appearing.The default is 80 ticks (4 second).
Lure does not affect this value. This will also effect the radius (0.1 * lureTime) of where the fish will appear.- 参数:
maxLureTime
- Maximum number of ticks one has to wait for a fish to bite
-
setLureTime
void setLureTime(int min, int max) Set both the minimum (default 20) and maximum (default 80) amount of ticks one has to wait for a fish to bite after appearing.- 参数:
min
- minimum ticks to wait for a bitemax
- maximum ticks to wait for a bite
-
getMinLureAngle
float getMinLureAngle()Get the minimum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.The default is 0 degrees.
- 返回:
- Minimum angle of where a fish will appear
-
setMinLureAngle
void setMinLureAngle(float minLureAngle) Set the minimum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.The default is 0 degrees.
- 参数:
minLureAngle
- Minimum angle of where a fish may appear
-
getMaxLureAngle
float getMaxLureAngle()Get the maximum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.The default is 360 degrees.
- 返回:
- Maximum angle of where a fish will appear
-
setMaxLureAngle
void setMaxLureAngle(float maxLureAngle) Set the maximum angle (in degrees, 0 being positive Z 90 being negative X) of where a fish will appear after the wait time.The default is 360 degrees.
- 参数:
maxLureAngle
- Maximum angle of where a fish may appear
-
setLureAngle
void setLureAngle(float min, float max) Set both the minimum (default 0) and maximum (default 360) angle of where a fish will appear after the wait time. 0 degrees is positive Z, 90 degrees is negative X.- 参数:
min
- minimum angle in degreesmax
- maximum angle in degrees
-
getApplyLure
boolean getApplyLure()Get whether the lure enchantment should be applied to reduce the wait time.The default is true.
Lure reduces the wait time by 100 ticks (5 seconds) for each level of the enchantment.- 返回:
- Whether the lure enchantment should be applied to reduce the wait time
-
setApplyLure
void setApplyLure(boolean applyLure) Set whether the lure enchantment should be applied to reduce the wait time.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
-
getBiteChance
已过时。Minecraft新版本中已无效果获取鱼咬钩的几率.0.0 = 永不上钩.
1.0 = 立即咬钩.原文: Gets the chance of a fish biting.
0.0 = No Chance.
1.0 = Instant catch.- 返回:
- chance 咬钩几率
-
setBiteChance
已过时。has no effect in newer Minecraft versionsSets the chance of a fish biting.0.0 = No Chance.
1.0 = Instant catch.- 参数:
chance
- the bite chance- 抛出:
IllegalArgumentException
- if the bite chance is not between 0 and 1
-
isInOpenWater
boolean isInOpenWater()Check whether or not this fish hook is in open water.Open water is defined by a 5x4x5 area of water, air and lily pads. If in open water, treasure items may be caught.
- 返回:
- true if in open water, false otherwise
-
getHookedEntity
Get the entity hooked by this fish hook.- 返回:
- the hooked entity. null if none
-
setHookedEntity
Set the entity hooked by this fish hook.- 参数:
entity
- the entity to set, or null to unhook
-
pullHookedEntity
boolean pullHookedEntity()Pull the hooked entity to the caster of this fish hook. If no entity is hooked, this method has no effect.- 返回:
- true if pulled, false if no entity is hooked
-
isSkyInfluenced
boolean isSkyInfluenced()Whether or not wait and lure time will be impacted by direct sky access. True by default, causes a 50% time increase on average.- 返回:
- skylight access influences catch rate
-
setSkyInfluenced
void setSkyInfluenced(boolean skyInfluenced) Set whether or not wait and lure time will be impacted by direct sky access. True by default, causes a 50% time increase on average.- 参数:
skyInfluenced
- if this hook is influenced by skylight access
-
isRainInfluenced
boolean isRainInfluenced()Whether or not wait and lure time will be impacted by rain. True by default, causes a 25% time decrease on average.- 返回:
- rain influences catch rate
-
setRainInfluenced
void setRainInfluenced(boolean rainInfluenced) Set whether or not wait and lure time will be impacted by rain. True by default, causes a 25% time decrease on average.- 参数:
rainInfluenced
- if this hook is influenced by rain
-
getState
Get the current state of this fish hook.- 返回:
- the fish hook state
-