钓鱼图鉴

钓鱼图鉴是 Codex 插件与 CustomFishing 插件深度集成的特色功能,能够自动记录玩家的钓鱼成果、鱼类统计、稀有度信息等,为钓鱼爱好者提供完整的数据追踪体验。

功能概述

主要特性

  • 🎣 自动记录:无需手动配置,自动记录所有钓到的鱼类
  • 📊 详细统计:记录每种鱼类的数量、最大尺寸、发现时间等
  • 🏆 稀有度系统:智能识别鱼类稀有度和钓鱼环境
  • 🌍 生物群系信息:显示每种鱼类的可钓区域
  • 🎁 奖励机制:发现新鱼类或完成收集时获得奖励

前置要求

  • ✅ 安装 CustomFishing 插件
  • ✅ 确保 CustomFishing 正常运行
  • ✅ 启用 Codex 钓鱼图鉴功能

基础配置

启用钓鱼图鉴

编辑 plugins/Codex/fishing.yml

# 基础设置
settings:
  # 启用钓鱼图鉴功能
  enabled: true

  # 自动从 CustomFishing 读取鱼类数据
  auto_generate: true

  # 分类名称(在主菜单中显示)
  category_name: "fishing"

  # 在主菜单中的位置
  main_menu_slot: 22

  # 排除的鱼类ID列表(不记录这些鱼类)
  excluded_fish: []

分组名称映射

CustomFishing 使用分组系统组织鱼类,您可以自定义这些分组的显示名称:

# Loot分组显示名称
# 根据 CustomFishing 的 loot-conditions.yml 中的分组ID进行映射
loot_group_names:
  ocean_fish: "海水组"
  river_fish: "淡水组"
  lava_fish: "岩浆组"
  deep_sea: "深海组"
  tropical: "热带组"
  arctic: "寒带组"
  loots_in_water: "全部水域"
  loots_in_lava: "全部岩浆"

  # 可以根据服务器的 CustomFishing 配置添加更多分组
  custom_group_1: "特殊水域"
  legendary_fish: "传奇鱼类"

稀有度映射

系统会根据分组名称自动判断鱼类稀有度:

# 分组到稀有度的映射(按优先级从上到下匹配)
rarity_mapping:
  # 星级系统
  iridium_star: "传奇"
  golden_star: "史诗"
  silver_star: "稀有"
  no_star: "普通"

  # 直接稀有度词汇
  legendary: "传奇"
  mythical: "神话"
  epic: "史诗"
  rare: "稀有"
  uncommon: "不常见"
  common: "普通"

  # 可以根据服务器配置添加更多映射
  ultra_rare: "超稀有"
  divine: "神圣"

环境映射

区分不同的钓鱼环境:

# 分组到钓鱼环境的映射
environment_mapping:
  lava: "岩浆中"
  lava_fish: "岩浆中"
  nether: "下界"

  water: "水中"
  ocean: "海洋中"
  river: "河流中"
  pond: "池塘中"

  # 默认环境
  default: "水中"

界面配置

GUI 外观设置

# 显示配置
display:
  # 分类图标
  category_item:
    id: FISHING_ROD
    name: '&b钓鱼图鉴'
    lore:
      - '&7记录所有可钓到的鱼类'
      - '&7发现进度: &e%progress_bar%'
      - '&7已解锁: %unlocked%/%total%'
      - '&7完成度: &e%percentage%%'

  # 已发现鱼类的显示
  discovery_unlocked:
    id: COD  # 默认使用鳕鱼图标,会被鱼类本身的图标覆盖
    name: "%name%"
    lore:
      - "%description%"
      - ""
      - "#7289da发现于: #ffffff%date%"
      - "#7289da捕获数量: #ffffff%amount%条"
      - "#7289da最大尺寸: #ffffff%max_size%厘米"
      - ""
      - "#7289da可钓生物群系:"
      - "#ffffff%biomes%"
      - "#7289da稀有度: #ffffff%rarity%"
      - "#7289da环境: #ffffff%environment%"

  # 未发现鱼类的显示
  discovery_blocked:
    id: BARRIER
    name: "#8c8c8c未知鱼类"
    lore:
      - "#8c8c8c继续钓鱼以发现这种鱼!"
      - ""
      - "#7289da可钓生物群系:"
      - "#ffffff%biomes%"
      - "#7289da稀有度: #ffffff%rarity%"
      - "#7289da环境: #ffffff%environment%"

显示选项

display:
  options:
    # 显示概率信息
    show_probability: true

    # 显示稀有度
    show_rarity: true

    # 显示钓鱼环境
    show_environment: true

    # 显示生物群系信息
    show_biomes: true

  # CustomFishing lore中需要屏蔽的关键词
  # 这些关键词会从鱼类描述中移除
  blocked_lore_keywords:
    - "{size_formatted}"
    - "{size}"
    - "{weight}"
    - "{probability}"
    - "尺寸"
    - "概率"
    - "重量"

数据统计功能

记录的数据类型

钓鱼图鉴会为每种鱼类记录以下信息:

  1. 基础信息

    • 鱼类名称和描述
    • 首次发现日期和时间
    • CustomFishing 中的原始ID
  2. 统计数据

    • 总捕获数量
    • 最大尺寸(厘米)
    • 平均尺寸
    • 最近捕获时间
  3. 位置信息

    • 可钓生物群系列表
    • 钓鱼环境(水中/岩浆中)
    • 特殊条件要求
  4. 稀有度信息

    • 稀有度等级
    • 所属分组
    • 捕获难度

统计变量

在配置中可以使用以下变量:

变量 说明 示例
%name% 鱼类名称 金枪鱼
%description% 鱼类描述 大型海洋鱼类...
%date% 首次发现日期 2024-11-04
%time% 首次发现时间 14:30:25
%amount% 总捕获数量 15
%max_size% 最大尺寸 87.5
%avg_size% 平均尺寸 62.3
%biomes% 可钓生物群系 海洋, 温带海洋
%rarity% 稀有度 稀有
%environment% 钓鱼环境 水中
%group% 所属分组 海水组

奖励系统

发现奖励配置

# 发现奖励
rewards:
  # 每次发现新鱼类的奖励
  per_discovery:
    - "centered_message: #6bcbfe&m                                                 "
    - "centered_message: "
    - "centered_message: #eeeeee&lCODEX UPDATED"
    - "centered_message: &7钓鱼图鉴: %name%"
    - "centered_message: &7稀有度: %rarity%"
    - "centered_message: "
    - "centered_message: #6bcbfe&m                                                 "
    - "playsound: BLOCK_NOTE_BLOCK_PLING;1;2"
    - "console_command: experience add %player% 50 points"
    - "title: 20;40;20;&b新鱼类发现!;&7%name%"

  # 发现全部鱼类的奖励
  all_discoveries:
    - "centered_message: #6bcbfe&m                                                 "
    - "centered_message: "
    - "centered_message: #eeeeee&l钓鱼大师!"
    - "centered_message: &7你已经发现了所有鱼类!"
    - "centered_message: &7真正的钓鱼专家!"
    - "centered_message: "
    - "centered_message: #6bcbfe&m                                                 "
    - "playsound: UI_TOAST_CHALLENGE_COMPLETE;1;1"
    - "console_command: experience add %player% 1000 points"
    - "console_command: give %player% fishing_rod{display:{Name:'{\"text\":\"大师级钓竿\",\"color\":\"gold\"}'},Enchantments:[{id:\"minecraft:luck_of_the_sea\",lvl:3}]} 1"

按稀有度分层奖励

# 高级奖励配置 - 根据稀有度给不同奖励
rewards:
  per_discovery:
    # 普通鱼类
    - "condition: %rarity% == 普通"
    - "console_command: experience add %player% 25 points"

    # 稀有鱼类  
    - "condition: %rarity% == 稀有"
    - "console_command: experience add %player% 100 points"
    - "broadcast: &e玩家 %player% 发现了稀有鱼类:%name%!"

    # 传奇鱼类
    - "condition: %rarity% == 传奇"
    - "console_command: experience add %player% 500 points"
    - "console_command: give %player% diamond 5"
    - "broadcast: &6玩家 %player% 发现了传奇鱼类:%name%!"

CustomFishing 集成

自动数据读取

Codex 会自动从 CustomFishing 读取以下数据:

  1. 鱼类配置

    • loot-items.yml 读取鱼类基本信息
    • 包括名称、描述、图标、稀有度等
  2. 分组信息

    • loot-conditions.yml 读取分组配置
    • 解析生物群系、环境、概率等条件
  3. 本地化文本

    • 支持多语言显示
    • 自动使用 CustomFishing 的语言文件

兼容性检查

插件会在启动时检查 CustomFishing 兼容性:

[Codex] CustomFishing Hook: 成功
[Codex] - 检测到 CustomFishing 版本: 2.3.15
[Codex] - 已加载鱼类数量: 47
[Codex] - 已加载分组数量: 12
[Codex] - 支持的生物群系: 24

实时同步

  • 当 CustomFishing 配置更新时,钓鱼图鉴会自动同步
  • 新添加的鱼类会立即出现在图鉴中
  • 删除的鱼类会被标记但保留玩家数据

高级配置

自定义鱼类过滤

settings:
  # 排除特定鱼类ID
  excluded_fish:
    - "test_fish"
    - "debug_item"

  # 排除包含特定关键词的鱼类
  excluded_keywords:
    - "test"
    - "debug"
    - "temp"

  # 只包含特定分组的鱼类
  included_groups:
    - "ocean_fish"
    - "river_fish"
    # 留空表示包含所有分组

尺寸记录设置

# 尺寸记录配置
size_tracking:
  # 启用尺寸记录
  enabled: true

  # 尺寸单位
  unit: "厘米"

  # 是否记录所有尺寸(false则只记录最大值)
  track_all_sizes: false

  # 尺寸显示精度(小数位数)
  decimal_places: 1

生物群系显示优化

# 生物群系显示配置
biome_display:
  # 最多显示的生物群系数量
  max_biomes: 8

  # 生物群系名称映射(本地化)
  biome_names:
    "minecraft:ocean": "海洋"
    "minecraft:deep_ocean": "深海"
    "minecraft:river": "河流"
    "minecraft:swamp": "沼泽"

  # 过多时的显示文本
  too_many_text: "&7...以及其他 %count% 个生物群系"

调试与故障排除

调试模式

启用调试模式查看详细信息:

# 在主配置文件中
settings:
  debug: true

调试信息包括:

  • CustomFishing 挂钩状态
  • 鱼类数据加载过程
  • 钓鱼事件处理
  • 数据同步状态

常见问题

问题:钓鱼图鉴不显示任何鱼类

排查步骤

  1. 确认 CustomFishing 插件已正确安装
  2. 检查控制台是否显示挂钩成功
  3. 验证 auto_generate 是否启用
  4. 查看是否有鱼类被排除

问题:某些鱼类没有被记录

排查步骤

  1. 检查鱼类是否在排除列表中
  2. 确认钓鱼事件是否被正确监听
  3. 查看 CustomFishing 事件是否正常触发
  4. 检查调试日志中的错误信息

问题:稀有度显示不正确

排查步骤

  1. 检查 rarity_mapping 配置
  2. 确认分组名称映射是否正确
  3. 查看 CustomFishing 中的分组配置
  4. 检查优先级匹配逻辑

性能优化

# 性能优化配置
performance:
  # 数据缓存时间(秒)
  cache_duration: 3600

  # 批量保存间隔(秒)
  batch_save_interval: 300

  # 最大缓存条目数
  max_cache_size: 1000

  # 是否异步处理钓鱼事件
  async_processing: true

使用示例

基础使用流程

  1. 配置启用

    settings:
      enabled: true
      auto_generate: true
    
  2. 开始钓鱼

    • 使用 CustomFishing 提供的钓竿
    • 在不同生物群系钓鱼
    • 每钓到新鱼类都会自动记录
  3. 查看图鉴

    • 输入 /codex 打开主界面
    • 点击钓鱼图鉴分类
    • 浏览已发现的鱼类信息

高级应用示例

钓鱼竞赛服务器

rewards:
  per_discovery:
    - "broadcast: &b%player% 发现了新鱼类 %name%! (稀有度: %rarity%)"
    - "console_command: eco give %player% 1000"
    - "console_command: crates key %player% fishing 1"

RPG 服务器

# 根据鱼类稀有度给予不同经验
rewards:
  per_discovery:
    - "condition: %rarity% == 普通"
    - "console_command: mcmmo addxp %player% fishing 100"
    - "condition: %rarity% == 稀有" 
    - "console_command: mcmmo addxp %player% fishing 500"
    - "console_command: moneybags give %player% 50"

下一步

了解了钓鱼图鉴后,您可以继续学习:

  1. 作物图鉴 - CustomCrops 集成功能
  2. 世界历史系统 - RPG 背景故事收集
  3. 第三方插件集成 - 更多插件集成
  4. 配置优化 - 奖励系统配置
Copyright © By MagciBili all right reserved,powered by Gitbook该文件修订时间: 2025-11-04 14:34:01

results matching ""

    No results matching ""