SearchContainer
简介
SearchContainer 是一款支持 Paper 和 Folia 服务端的 Minecraft 容器搜索插件。手持物品作为模板,快速搜索容器并精确定位物品位置。
核心功能
- 按物品搜索:手持物品,搜索容器
- 智能匹配:支持可切换的名称/附魔/描述过滤
- 全图扫描:
/sc all 读取 .mca 区域文件以扫描世界中所有已生成的区块
- 一键传送:点击结果坐标即可瞬间传送
- 多语言:内置简体中文与美式英语,可扩展
命令列表
| 命令 |
描述 |
权限 |
/sc <半径> [标志] |
搜索以你为中心、指定区块半径内的已加载容器 |
searchcontainer.useOP |
/sc all [标志] |
搜索整个世界中所有生成的容器(读取区域文件) |
searchcontainer.use.allOP |
| /sc cancel | 取消正在进行的搜索 | searchcontainer.useOP |
| /sc reload | 重新加载配置文件和语言文件 | searchcontainer.useOP |
过滤标志
| 标志 |
效果描述 |
-name |
候选物品名称 包含 所持模板的显示名称(默认要求完全匹配) |
-enchant |
候选物品 包含 所持模板的所有附魔,且等级 ≥ 模板等级 |
-lore |
候选物品 Lore 包含 所持模板的每一行 Lore |
默认模式(无参数):完全匹配——物品类型、自定义名称、附魔、描述文本和 PDC 必须全部一致。
使用示例
# 半径 5 个区块,完全匹配(仅扫描已加载的区块)
/sc 5
# 扫描世界中所有已生成的区块
/sc all
# 全图扫描,忽略已重命名的物品
/sc all -name
# 半径 16,包含附魔与自定义名称(lore)
/sc 16 -enchant -lore
# 取消当前搜索
/sc cancel
配置 (config.yml)
# zh_CN, en_US
language: zh_CN
# 搜索冷却时间(秒)
cooldown-seconds: 3
# 每次搜索显示的最大结果数量(超出部分将被隐藏)
max-results-display: 1000
# 半径模式下允许的最大区块半径(不影响 /sc all 命令)
max-radius: 32
运行机制
| 搜索模式 |
扫描范围 |
磁盘读取 |
加载新区块 |
| 半径模式 |
以玩家为中心的 N×N 区块,仅扫描已加载的区块 |
否 |
否 |
| 全图模式 |
世界中所有已生成的区块(解析 .mca 文件头) |
是 |
否 |
全图模式详细说明:
- 解析
r.x.z.mca 文件头部的 4096 字节区块位置表
- 获取世界中所有曾经生成过的区块坐标
- 仅扫描当前已加载的区块,不会主动加载未加载的区块
- 避免因扫描导致的服务器卡顿或区块实体加载问题
注意事项
- 半径搜索:受
max-radius 限制,仅扫描已加载的区块
- 全图搜索:不受
max-radius 限制,会遍历世界中的所有 .mca 文件,但仅扫描当前已加载的区块
- 在全生存服务器或拥有数千天游戏时间的存档中,全图搜索可能需要较长时间;建议适当设置
max-results-display
- 必须手持物品才能执行搜索;空手时无法执行
- 支持所有
Container(容器)类型的方块:箱子、陷阱箱、漏斗、发射器、投掷器、潜影盒、熔炉等
bStats
SearchContainer
Introduction
SearchContainer is a Minecraft container search plugin that supports Paper and Folia server cores. Hold an item as a template to quickly search containers and precisely locate item positions.
Core Features
- Search by Item: Hold an item, search through containers
- Smart Matching: Support togglable filters for name/enchantments/Lore
- World-Scanning:
/sc all reads .mca region files to scan all generated chunks in the world
- One-Click Teleport: Click result coordinates to instantly teleport
- Multi-Language: Built-in Simplified Chinese and American English, extensible
Command List
| Command |
Description |
Permission |
/sc <radius> [flags] |
Searches loaded containers within a specified chunk radius centered on you |
searchcontainer.useOP |
/sc all [flags] |
Searches all generated containers in the entire world (reads region files) |
searchcontainer.use.allOP |
/sc cancel |
Cancels an ongoing search |
searchcontainer.useOP |
/sc reload |
Reloads configuration and language files |
searchcontainer.useOP |
Filter Flags
| Flag |
Effect Description |
-name |
Candidate item name contains the display name of the held template (default requires exact match) |
-enchant |
Candidate item contains all enchantments of the held template, with levels ≥ template levels |
-lore |
Candidate item Lore contains every line of lore from the held template |
Default Mode (no flags): Exact match — item type, custom name, enchantments, Lore, PDC must all be equal.
Usage Examples
# Radius 5 chunks, exact match (scans only loaded chunks)
/sc 5
# World-scan all generated chunks
/sc all
# World-scan, ignore renamed items
/sc all -name
# Radius 16, enchantment containment + lore containment
/sc 16 -enchant -lore
# Cancel current search
/sc cancel
Configuration (config.yml)
# zh_CN, en_US
language: zh_CN
# Search cooldown time (seconds)
cooldown-seconds: 3
# Maximum number of results displayed per search (excess results are hidden)
max-results-display: 1000
# Maximum chunk radius allowed in radius mode (does not affect /sc all)
max-radius: 32
Operational Mechanism
| Search Mode |
Scan Range |
Disk Read |
Loads New Chunks |
| Radius Mode |
N×N chunks centered on player, scans only loaded chunks |
No |
No |
| World Mode |
All generated chunks in the world (parses .mca file headers) |
Yes |
No |
World Mode Detailed Explanation:
- Parses the 4096-byte chunk location table at the header of
r.x.z.mca files
- Retrieves coordinates of all chunks ever generated in the world
- Scans only currently loaded chunks, does not actively load unloaded chunks
- Avoids server lag or loading chunk entities caused by scanning
Important Notes
- Radius Search: Limited by
max-radius, scans only loaded chunks
- World Search: Not limited by
max-radius, traverses all .mca files in the world but scans only currently loaded chunks
- World search may take considerable time on large survival servers or archives with thousands of days; it is recommended to set
max-results-display appropriately
- Must hold an item to search; cannot execute with an empty hand
- Supports all
Container type containers: Chests, Trapped Chests, Hoppers, Dispensers, Droppers, Shulker Boxes, Furnaces, etc.
bStats
评论 0
登录后参与评分
还没有评论,来抢沙发吧