0 ? "config-explorer-node" : "config-explorer-node-noflex"}
+ onMouseLeave={() => {
+ setPopupNode(null);
+ }}
+ >
+
+ {level > 0 &&
}
+ {level > 0 &&
}
+
+
+ {hasUrl ? (
+
+
+
{node.name}
+
+ ) : (
+
+
+ {node.name}
+
+ )}
+ {hasDescription &&
+ (showDescriptionBelow ? null : (
+
+
+ ⓘ
+
+
+
+ 简介:
+
+ {node.description}
+
+
+
+ ))}
+
+
+
+ {showDescriptionBelow && hasDescription && (
+
+
+
{isLast ? " " : "│ "}
+
{node.description}
+
+ )}
+
+ {hasChildren &&
+ node.children &&
+ node.children.map((child, index) => (
+
+ {renderNode(child, level + 1, index === node.children!.length - 1, newAncestors)}
+
+ ))}
+
+ );
+ };
+
+ return (
+
+
+
+
+
+ {data.map((item) => (
+ {renderNode(item)}
+ ))}
+
+
+ );
+}
diff --git a/src/css/base/theme.css b/src/css/base/theme.css
index 4b8497d1b..d0dd3b32c 100644
--- a/src/css/base/theme.css
+++ b/src/css/base/theme.css
@@ -511,6 +511,16 @@ button[class*="colorModeToggle"]:active::after {
}
}
+[data-theme="dark"] {
+ --config-node-highlight-text-color: white;
+ --config-node-popup-background-color: #1c1e21;
+}
+
+[data-theme="light"] {
+ --config-node-highlight-text-color: black;
+ --config-node-popup-background-color: white;
+}
+
/* 尊重用户减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
*,
diff --git a/src/css/structure_explorer.css b/src/css/structure_explorer.css
new file mode 100644
index 000000000..65452bead
--- /dev/null
+++ b/src/css/structure_explorer.css
@@ -0,0 +1,105 @@
+@layer theme, base, components, utilities;
+
+@import "tailwindcss/theme.css" layer(theme);
+@import "tailwindcss/utilities.css" layer(utilities);
+
+/* Outer Container */
+.config-explorer-code-outer-container {
+ @apply overflow-visible flex flex-col;
+}
+
+/* File Node */
+.config-explorer-file-node {
+ @apply flex items-center rounded-[10px] w-fit shrink-0 whitespace-nowrap cursor-default;
+}
+
+.config-explorer-file-node-with-link,
+.config-explorer-file-folder-node-with-link {
+ @apply font-bold;
+}
+
+.config-explorer-file-node-with-link:hover,
+.config-explorer-file-folder-node-with-link:hover {
+ @apply bg-black/10 cursor-pointer no-underline;
+}
+
+/* File Folder Node */
+.config-explorer-file-folder-node {
+ @apply flex items-center w-fit cursor-default no-underline;
+ color: var(--config-node-highlight-text-color);
+}
+
+.config-explorer-file-folder-node-with-link {
+ color: var(--ifm-link-color);
+}
+
+/* Popup Window */
+.config-explorer-popup-window-container {
+ @apply relative inline-block align-middle;
+}
+
+.config-explorer-popup-window {
+ @apply absolute p-2.5 rounded border-0 whitespace-normal z-20;
+ background-color: var(--config-node-popup-background-color);
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+ min-width: 200px;
+ max-width: 500px;
+ width: max-content;
+ left: 20px;
+ top: -10px;
+ margin-left: 5px;
+ margin-top: -5px;
+}
+
+.config-explorer-popup-window-open-tag {
+ @apply z-5 ml-0.75 cursor-pointer font-normal hover:font-bold;
+}
+
+/* Tree Components */
+.tree-line,
+.prefix-line {
+ @apply text-sm text-slate-400 inline-block font-mono leading-none;
+}
+
+/* Node Icon */
+.config-explorer-node-icon {
+ @apply text-base mr-1.25;
+ color: var(--config-node-highlight-text-color);
+}
+
+/* Node Structure */
+.config-explorer-node,
+.config-explorer-node-noflex {
+ @apply items-start relative flex flex-col shrink-0;
+}
+
+.config-explorer-node-noflex {
+ @apply my-1.25;
+}
+
+.config-explorer-node-header {
+ @apply flex items-center;
+}
+
+.config-explorer-node-content {
+ @apply flex items-center;
+}
+
+.config-node-contents-wrapper {
+ @apply mx-1.25 flex items-center text-base;
+}
+
+/* Description Below */
+.config-explorer-description-below {
+ @apply flex items-start my-0.5 py-0.5 text-xs leading-relaxed;
+}
+
+.config-explorer-description-text {
+ @apply text-gray-400 whitespace-normal wrap-break-word flex-1;
+ max-width: 600px;
+}
+
+/* Utility */
+.display--none {
+ @apply hidden;
+}
diff --git a/src/data/structures/bdsServerStructure.ts b/src/data/structures/bdsServerStructure.ts
new file mode 100644
index 000000000..b2351501c
--- /dev/null
+++ b/src/data/structures/bdsServerStructure.ts
@@ -0,0 +1,124 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const bdsServerStructure: ExplorerNode[] = [
+ {
+ name: "BDS服务端文件夹",
+ type: "folder",
+ children: [
+ {
+ name: "behavior_packs",
+ type: "folder",
+ description: "安装新行为包的文件夹",
+ },
+ {
+ name: "config",
+ type: "folder",
+ description: "没啥用",
+ },
+ {
+ name: "definitions",
+ type: "folder",
+ description: "貌似是生成群系的内容",
+ },
+ {
+ name: "development_behavior_packs",
+ type: "folder",
+ description: "为开发者提供安装新行为包的文件夹",
+ },
+ {
+ name: "development_resource_packs",
+ type: "folder",
+ description: "为开发者提供安装新资源包的文件夹",
+ },
+ {
+ name: "development_skin_packs",
+ type: "folder",
+ description: "为开发者提供安装新皮肤包的文件夹",
+ },
+ {
+ name: "resource_packs",
+ type: "folder",
+ description: "安装新资源包的文件夹",
+ },
+ {
+ name: "world-templates",
+ type: "folder",
+ description: "世界模板",
+ },
+ {
+ name: "worlds",
+ type: "folder",
+ description: "主世界文件夹",
+ children: [
+ {
+ name: "Bedrock level",
+ type: "folder",
+ description: "世界存档",
+ children: [
+ {
+ name: "db",
+ type: "folder",
+ description: "存档数据文件夹",
+ },
+ {
+ name: "level_dat",
+ type: "file",
+ description: "存档设定",
+ },
+ {
+ name: "level.dat_old",
+ type: "file",
+ description: "存档设定 (旧)",
+ },
+ {
+ name: "level_name.txt",
+ type: "file",
+ description: "存档名称",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "allowlist.json",
+ type: "file",
+ description: "白名单文件",
+ },
+ {
+ name: "bedrock_server.exe",
+ type: "file",
+ description: "服务端启动程序",
+ },
+ {
+ name: "bedrock_server.pdb",
+ type: "file",
+ description: "程序数据库文件",
+ },
+ {
+ name: "bedrock_server_how_to.html",
+ type: "file",
+ description: "如何使用 BDS 服务器的官方指南",
+ },
+ {
+ name: "permissions.json",
+ type: "file",
+ description: "管理员 (OP) 玩家相关数据",
+ },
+ {
+ name: "release-notes.txt",
+ type: "file",
+ description: "服务端发行版本详情",
+ },
+ {
+ name: "server.properties",
+ type: "file",
+ description: "配置文件",
+ },
+ {
+ name: "valid_known_packs.json",
+ type: "file",
+ description: "已知的附加包",
+ },
+ ],
+ },
+];
diff --git a/src/data/structures/datapackStructure.ts b/src/data/structures/datapackStructure.ts
new file mode 100644
index 000000000..53b287990
--- /dev/null
+++ b/src/data/structures/datapackStructure.ts
@@ -0,0 +1,854 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const datapackStructure: ExplorerNode[] = [
+ {
+ name: "数据包名",
+ type: "folder",
+ children: [
+ {
+ name: "pack.mcmeta",
+ type: "file",
+ description: "用于识别数据包及存储数据包信息",
+ },
+ {
+ name: "pack.png",
+ type: "file",
+ description: "数据包的图片 (可选)",
+ },
+ {
+ name: "data",
+ type: "folder",
+ children: [
+ {
+ name: "advancements",
+ type: "folder",
+ children: [
+ {
+ name: "特定进度名.json",
+ type: "structure",
+ children: [
+ {
+ name: "display",
+ type: "folder",
+ description: "进度的显示信息",
+ children: [
+ {
+ name: "title",
+ type: "file",
+ description: "进度标题",
+ },
+ {
+ name: "description",
+ type: "file",
+ description: "进度描述",
+ },
+ {
+ name: "icon",
+ type: "file",
+ description: "进度图标",
+ },
+ ],
+ },
+ {
+ name: "criteria",
+ type: "folder",
+ description: "进度达成条件",
+ children: [
+ {
+ name: "特定条件名.json",
+ type: "structure",
+ children: [
+ {
+ name: "trigger",
+ type: "file",
+ description: "触发条件类型",
+ },
+ {
+ name: "conditions",
+ type: "file",
+ description: "具体的条件参数",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "loot_tables",
+ type: "folder",
+ children: [
+ {
+ name: "特定物品或实体的战利品表.json",
+ type: "structure",
+ children: [
+ {
+ name: "pools",
+ type: "folder",
+ description: "战利品池列表",
+ children: [
+ {
+ name: "特定战利品池.json",
+ type: "structure",
+ children: [
+ {
+ name: "rolls",
+ type: "file",
+ description: "战利品生成次数",
+ },
+ {
+ name: "entries",
+ type: "folder",
+ description: "战利品条目",
+ children: [
+ {
+ name: "特定条目.json",
+ type: "structure",
+ children: [
+ {
+ name: "type",
+ type: "file",
+ description:
+ "条目类型,如 item、loot_table 等",
+ },
+ {
+ name: "name",
+ type: "file",
+ description:
+ "物品或战利品表名称",
+ },
+ {
+ name: "functions",
+ type: "folder",
+ description:
+ "可选的函数列表,用于修改战利品",
+ children: [
+ {
+ name: "特定函数.json",
+ type: "structure",
+ children: [
+ {
+ name: "function",
+ type: "file",
+ description:
+ "函数类型,如 set_nbt、enchant_with_levels 等",
+ },
+ {
+ name: "arguments",
+ type: "file",
+ description:
+ "函数参数",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "recipes",
+ type: "folder",
+ children: [
+ {
+ name: "特定合成配方.json",
+ type: "structure",
+ children: [
+ {
+ name: "type",
+ type: "file",
+ description:
+ "合成配方类型,如 crafting_shaped、crafting_shapeless 等",
+ },
+ {
+ name: "group",
+ type: "file",
+ description: "合成组名 (可选)",
+ },
+ {
+ name: "ingredients",
+ type: "folder",
+ description: "合成所需的材料列表",
+ children: [
+ {
+ name: "特定材料.json",
+ type: "structure",
+ children: [
+ {
+ name: "item",
+ type: "file",
+ description: "物品名称",
+ },
+ {
+ name: "count",
+ type: "file",
+ description: "物品数量 (可选)",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "result",
+ type: "folder",
+ description: "合成结果",
+ children: [
+ {
+ name: "item",
+ type: "file",
+ description: "合成后的物品名称",
+ },
+ {
+ name: "count",
+ type: "file",
+ description: "合成后的物品数量 (可选)",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "tags",
+ type: "folder",
+ children: [
+ {
+ name: "blocks",
+ type: "folder",
+ children: [
+ {
+ name: "特定方块标签.json",
+ type: "structure",
+ children: [
+ {
+ name: "replace",
+ type: "file",
+ description: "是否替换已有标签 (可选)",
+ },
+ {
+ name: "values",
+ type: "file",
+ description: "方块名称列表",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "fluids",
+ type: "folder",
+ children: [
+ {
+ name: "特定流体标签.json",
+ type: "structure",
+ children: [
+ {
+ name: "replace",
+ type: "file",
+ description: "是否替换已有标签 (可选)",
+ },
+ {
+ name: "values",
+ type: "file",
+ description: "流体名称列表",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "items",
+ type: "folder",
+ children: [
+ {
+ name: "特定物品标签.json",
+ type: "structure",
+ children: [
+ {
+ name: "replace",
+ type: "file",
+ description: "是否替换已有标签 (可选)",
+ },
+ {
+ name: "values",
+ type: "file",
+ description: "物品名称列表",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "entity_types",
+ type: "folder",
+ children: [
+ {
+ name: "特定实体类型标签.json",
+ type: "structure",
+ children: [
+ {
+ name: "replace",
+ type: "file",
+ description: "是否替换已有标签 (可选)",
+ },
+ {
+ name: "values",
+ type: "file",
+ description: "实体类型名称列表",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "functions",
+ type: "folder",
+ children: [
+ {
+ name: "特定函数标签.json",
+ type: "structure",
+ children: [
+ {
+ name: "replace",
+ type: "file",
+ description: "是否替换已有标签 (可选)",
+ },
+ {
+ name: "values",
+ type: "file",
+ description: "函数名称列表",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "predicates",
+ type: "folder",
+ children: [
+ {
+ name: "特定谓词标签.json",
+ type: "structure",
+ children: [
+ {
+ name: "replace",
+ type: "file",
+ description: "是否替换已有标签 (可选)",
+ },
+ {
+ name: "values",
+ type: "file",
+ description: "谓词名称列表",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "damage_types",
+ type: "folder",
+ children: [
+ {
+ name: "特定伤害类型标签.json",
+ type: "structure",
+ children: [
+ {
+ name: "replace",
+ type: "file",
+ description: "是否替换已有标签 (可选)",
+ },
+ {
+ name: "values",
+ type: "file",
+ description: "伤害类型名称列表",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "enchantments",
+ type: "folder",
+ children: [
+ {
+ name: "特定附魔标签.json",
+ type: "structure",
+ children: [
+ {
+ name: "replace",
+ type: "file",
+ description: "是否替换已有标签 (可选)",
+ },
+ {
+ name: "values",
+ type: "file",
+ description: "附魔名称列表",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "game_events",
+ type: "folder",
+ children: [
+ {
+ name: "特定游戏事件标签.json",
+ type: "structure",
+ children: [
+ {
+ name: "replace",
+ type: "file",
+ description: "是否替换已有标签 (可选)",
+ },
+ {
+ name: "values",
+ type: "file",
+ description: "游戏事件名称列表",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "functions",
+ type: "folder",
+ children: [
+ {
+ name: "特定函数文件.mcfunction",
+ type: "file",
+ description: "可以是游戏中的各种命令,用于实现特定的逻辑",
+ },
+ ],
+ },
+ {
+ name: "predicates",
+ type: "folder",
+ children: [
+ {
+ name: "特定谓词.json",
+ type: "structure",
+ children: [
+ {
+ name: "condition",
+ type: "file",
+ description: "谓词条件",
+ },
+ {
+ name: "result",
+ type: "file",
+ description: "谓词结果,通常是布尔值",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "dimension_types",
+ type: "folder",
+ children: [
+ {
+ name: "特定维度类型.json",
+ type: "structure",
+ children: [
+ {
+ name: "effects",
+ type: "folder",
+ description: "维度效果列表",
+ children: [
+ {
+ name: "特定效果.json",
+ type: "structure",
+ children: [
+ {
+ name: "特定效果类型",
+ type: "file",
+ description: "如 fog_color、ambient_light 等",
+ },
+ {
+ name: "值",
+ type: "file",
+ description: "根据效果类型而定",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "parameters",
+ type: "folder",
+ description: "维度类型参数",
+ children: [
+ {
+ name: "特定参数.json",
+ type: "structure",
+ children: [
+ {
+ name: "名称",
+ type: "file",
+ description: "参数名称",
+ },
+ {
+ name: "值",
+ type: "file",
+ description: "参数值",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "worldgen",
+ type: "folder",
+ children: [
+ {
+ name: "biome",
+ type: "folder",
+ children: [
+ {
+ name: "特定生物群系.json",
+ type: "structure",
+ children: [
+ {
+ name: "features",
+ type: "folder",
+ description: "生物群系特征列表",
+ children: [
+ {
+ name: "特定特征.json",
+ type: "structure",
+ children: [
+ {
+ name: "特定特征类型",
+ type: "file",
+ description: "如 lake、flower 等",
+ },
+ {
+ name: "参数",
+ type: "file",
+ description: "根据特征类型而定",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "properties",
+ type: "folder",
+ description: "生物群系属性",
+ children: [
+ {
+ name: "特定属性.json",
+ type: "structure",
+ children: [
+ {
+ name: "名称",
+ type: "file",
+ description: "属性名称",
+ },
+ {
+ name: "值",
+ type: "file",
+ description: "属性值",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "configured_carver",
+ type: "folder",
+ children: [
+ {
+ name: "特定雕刻器.json",
+ type: "structure",
+ children: [
+ {
+ name: "type",
+ type: "file",
+ description: "雕刻器类型",
+ },
+ {
+ name: "biomes",
+ type: "file",
+ description: "适用的生物群系列表",
+ },
+ {
+ name: "parameters",
+ type: "folder",
+ description: "雕刻器参数",
+ children: [
+ {
+ name: "特定参数.json",
+ type: "structure",
+ children: [
+ {
+ name: "名称",
+ type: "file",
+ description: "参数名称",
+ },
+ {
+ name: "值",
+ type: "file",
+ description: "参数值",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "configured_feature",
+ type: "folder",
+ children: [
+ {
+ name: "特定配置特征.json",
+ type: "structure",
+ children: [
+ {
+ name: "type",
+ type: "file",
+ description: "特征类型",
+ },
+ {
+ name: "placement",
+ type: "folder",
+ description: "放置规则",
+ children: [
+ {
+ name: "特定放置规则.json",
+ type: "structure",
+ children: [
+ {
+ name: "规则类型",
+ type: "file",
+ description:
+ "如 height_range、on_ground 等",
+ },
+ {
+ name: "参数",
+ type: "file",
+ description: "根据规则类型而定",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "parameters",
+ type: "folder",
+ description: "特征参数",
+ children: [
+ {
+ name: "特定参数.json",
+ type: "structure",
+ children: [
+ {
+ name: "名称",
+ type: "file",
+ description: "参数名称",
+ },
+ {
+ name: "值",
+ type: "file",
+ description: "参数值",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "configured_structure_feature",
+ type: "folder",
+ children: [
+ {
+ name: "特定配置结构特征.json",
+ type: "structure",
+ children: [
+ {
+ name: "type",
+ type: "file",
+ description: "结构特征类型",
+ },
+ {
+ name: "placement",
+ type: "folder",
+ description: "放置规则",
+ children: [
+ {
+ name: "特定放置规则.json",
+ type: "structure",
+ children: [
+ {
+ name: "规则类型",
+ type: "file",
+ description:
+ "如 surface_rule、biome_filter 等",
+ },
+ {
+ name: "参数",
+ type: "file",
+ description: "根据规则类型而定",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "parameters",
+ type: "folder",
+ description: "结构特征参数",
+ children: [
+ {
+ name: "特定参数.json",
+ type: "structure",
+ children: [
+ {
+ name: "名称",
+ type: "file",
+ description: "参数名称",
+ },
+ {
+ name: "值",
+ type: "file",
+ description: "参数值",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "noise",
+ type: "folder",
+ children: [
+ {
+ name: "特定噪声设置.json",
+ type: "structure",
+ children: [
+ {
+ name: "noise_type",
+ type: "file",
+ description: "噪声类型",
+ },
+ {
+ name: "parameters",
+ type: "folder",
+ description: "噪声参数",
+ children: [
+ {
+ name: "特定参数.json",
+ type: "structure",
+ children: [
+ {
+ name: "名称",
+ type: "file",
+ description: "参数名称",
+ },
+ {
+ name: "值",
+ type: "file",
+ description: "参数值",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "processor_list",
+ type: "folder",
+ children: [
+ {
+ name: "特定处理器列表.json",
+ type: "structure",
+ children: [
+ {
+ name: "processors",
+ type: "folder",
+ description: "处理器列表",
+ children: [
+ {
+ name: "特定处理器.json",
+ type: "structure",
+ children: [
+ {
+ name: "type",
+ type: "file",
+ description: "处理器类型",
+ },
+ {
+ name: "parameters",
+ type: "folder",
+ description: "处理器参数",
+ children: [
+ {
+ name: "特定参数.json",
+ type: "structure",
+ children: [
+ {
+ name: "名称",
+ type: "file",
+ description:
+ "参数名称",
+ },
+ {
+ name: "值",
+ type: "file",
+ description:
+ "参数值",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+];
diff --git a/src/data/structures/geyserExtensionStructure.ts b/src/data/structures/geyserExtensionStructure.ts
new file mode 100644
index 000000000..3b6e24f7d
--- /dev/null
+++ b/src/data/structures/geyserExtensionStructure.ts
@@ -0,0 +1,34 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const geyserExtensionStructure: ExplorerNode[] = [
+ {
+ name: "服务器根目录/",
+ type: "folder",
+ children: [
+ {
+ name: "plugins/",
+ type: "folder",
+ children: [
+ {
+ name: "Geyser-Spigot/",
+ type: "folder",
+ children: [
+ {
+ name: "extensions/",
+ type: "folder",
+ description: "Geyser 扩展文件夹",
+ children: [
+ {
+ name: "MCXboxBroadcastExtension.jar",
+ type: "file",
+ description: "Xbox 直播扩展",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+];
diff --git a/src/data/structures/gradleProjectStructure.ts b/src/data/structures/gradleProjectStructure.ts
new file mode 100644
index 000000000..846eb38aa
--- /dev/null
+++ b/src/data/structures/gradleProjectStructure.ts
@@ -0,0 +1,166 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const gradleProjectStructure: ExplorerNode[] = [
+ {
+ name: "项目根目录",
+ type: "folder",
+ children: [
+ {
+ name: "src/",
+ type: "folder",
+ description: "源代码目录",
+ children: [
+ {
+ name: "main/",
+ type: "folder",
+ description: "主要代码目录",
+ children: [
+ {
+ name: "java/",
+ type: "folder",
+ description: "Java 源代码",
+ children: [
+ {
+ name: "com/",
+ type: "folder",
+ children: [
+ {
+ name: "example/",
+ type: "folder",
+ children: [
+ {
+ name: "plugin/",
+ type: "folder",
+ children: [
+ {
+ name: "Main.java",
+ type: "file",
+ description: "插件主类",
+ },
+ {
+ name: "commands/",
+ type: "folder",
+ description: "命令类",
+ },
+ {
+ name: "listeners/",
+ type: "folder",
+ description: "监听器类",
+ },
+ {
+ name: "utils/",
+ type: "folder",
+ description: "工具类",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "kotlin/",
+ type: "folder",
+ description: "Kotlin 源代码(如果使用)",
+ },
+ {
+ name: "resources/",
+ type: "folder",
+ description: "资源文件目录",
+ children: [
+ {
+ name: "plugin.yml",
+ type: "file",
+ description: "插件配置文件",
+ },
+ {
+ name: "config.yml",
+ type: "file",
+ description: "插件默认配置",
+ },
+ {
+ name: "messages/",
+ type: "folder",
+ description: "语言文件",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "test/",
+ type: "folder",
+ description: "测试代码目录",
+ children: [
+ {
+ name: "java/",
+ type: "folder",
+ description: "测试源代码",
+ },
+ {
+ name: "kotlin/",
+ type: "folder",
+ description: "Kotlin 测试代码",
+ },
+ {
+ name: "resources/",
+ type: "folder",
+ description: "测试资源",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "build/",
+ type: "folder",
+ description: "构建输出目录",
+ children: [
+ {
+ name: "libs/",
+ type: "folder",
+ description: "构建产物(jar 文件)",
+ },
+ ],
+ },
+ {
+ name: "gradle/",
+ type: "folder",
+ description: "Gradle 包装器目录",
+ children: [
+ {
+ name: "wrapper/",
+ type: "folder",
+ },
+ ],
+ },
+ {
+ name: "build.gradle",
+ type: "file",
+ description: "Gradle 构建脚本",
+ },
+ {
+ name: "settings.gradle",
+ type: "file",
+ description: "Gradle 设置文件",
+ },
+ {
+ name: "gradlew",
+ type: "file",
+ description: "Gradle 包装器脚本 (Unix)",
+ },
+ {
+ name: "gradlew.bat",
+ type: "file",
+ description: "Gradle 包装器脚本 (Windows)",
+ },
+ {
+ name: "README.md",
+ type: "file",
+ description: "项目说明文件",
+ },
+ ],
+ },
+];
diff --git a/src/data/structures/hmclModpackStructure.ts b/src/data/structures/hmclModpackStructure.ts
new file mode 100644
index 000000000..8097426e2
--- /dev/null
+++ b/src/data/structures/hmclModpackStructure.ts
@@ -0,0 +1,32 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const hmclModpackStructure: ExplorerNode[] = [
+ {
+ name: "MyModpack/",
+ type: "folder",
+ children: [
+ {
+ name: "java/",
+ type: "folder",
+ children: [
+ {
+ name: "bin/",
+ type: "folder",
+ },
+ ],
+ },
+ {
+ name: "HMCL.exe",
+ type: "file",
+ },
+ {
+ name: "hmcl.json",
+ type: "file",
+ },
+ {
+ name: ".minecraft/",
+ type: "folder",
+ },
+ ],
+ },
+];
diff --git a/src/data/structures/index.ts b/src/data/structures/index.ts
new file mode 100644
index 000000000..5de040bc8
--- /dev/null
+++ b/src/data/structures/index.ts
@@ -0,0 +1,11 @@
+export { bdsServerStructure } from "./bdsServerStructure";
+export { datapackStructure } from "./datapackStructure";
+export { geyserExtensionStructure } from "./geyserExtensionStructure";
+export { gradleProjectStructure } from "./gradleProjectStructure";
+export { hmclModpackStructure } from "./hmclModpackStructure";
+export { levilamnaPluginStructure } from "./levilamnaPluginStructure";
+export { mavenProjectStructure } from "./mavenProjectStructure";
+export { nukitServerStructure } from "./nukitServerStructure";
+export { serverDirStructureData } from "./serverDirStructureData";
+export { viaproxyStructure } from "./viaproxyStructure";
+
diff --git a/src/data/structures/levilamnaPluginStructure.ts b/src/data/structures/levilamnaPluginStructure.ts
new file mode 100644
index 000000000..475e77678
--- /dev/null
+++ b/src/data/structures/levilamnaPluginStructure.ts
@@ -0,0 +1,28 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const levilamnaPluginStructure: ExplorerNode[] = [
+ {
+ name: "插件文件夹",
+ type: "folder",
+ children: [
+ {
+ name: "manifest.json",
+ type: "file",
+ description:
+ "插件元数据文件,该文件必须存在并格式正确才能被 LeviLamina 识别",
+ },
+ {
+ name: "(插件配置文件和数据库)...",
+ type: "folder",
+ description:
+ "插件生成的配置文件和数据库等,大多数插件的配置文件名叫 config.json,并以一个文件夹或一个 .db 或 .json 后缀文件作为数据库",
+ },
+ {
+ name: "(插件代码或二进制文件)...",
+ type: "folder",
+ description:
+ "插件源代码,通常是 .js、.lua、.dll 后缀的文件。不要删除,修改或重命名文件,否则可能导致插件无法运行!",
+ },
+ ],
+ },
+];
diff --git a/src/data/structures/mavenProjectStructure.ts b/src/data/structures/mavenProjectStructure.ts
new file mode 100644
index 000000000..7b348f348
--- /dev/null
+++ b/src/data/structures/mavenProjectStructure.ts
@@ -0,0 +1,123 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const mavenProjectStructure: ExplorerNode[] = [
+ {
+ name: "项目根目录",
+ type: "folder",
+ children: [
+ {
+ name: "src/",
+ type: "folder",
+ description: "源代码目录",
+ children: [
+ {
+ name: "main/",
+ type: "folder",
+ description: "主要代码目录",
+ children: [
+ {
+ name: "java/",
+ type: "folder",
+ description: "Java 源代码",
+ children: [
+ {
+ name: "com/",
+ type: "folder",
+ children: [
+ {
+ name: "example/",
+ type: "folder",
+ children: [
+ {
+ name: "plugin/",
+ type: "folder",
+ children: [
+ {
+ name: "Main.java",
+ type: "file",
+ description: "插件主类",
+ },
+ {
+ name: "commands/",
+ type: "folder",
+ description: "命令类",
+ },
+ {
+ name: "listeners/",
+ type: "folder",
+ description: "监听器类",
+ },
+ {
+ name: "utils/",
+ type: "folder",
+ description: "工具类",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "resources/",
+ type: "folder",
+ description: "资源文件目录",
+ children: [
+ {
+ name: "plugin.yml",
+ type: "file",
+ description: "插件配置文件",
+ },
+ {
+ name: "config.yml",
+ type: "file",
+ description: "插件默认配置",
+ },
+ {
+ name: "messages/",
+ type: "folder",
+ description: "语言文件",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "test/",
+ type: "folder",
+ description: "测试代码目录",
+ children: [
+ {
+ name: "java/",
+ type: "folder",
+ description: "测试源代码",
+ },
+ {
+ name: "resources/",
+ type: "folder",
+ description: "测试资源",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "target/",
+ type: "folder",
+ description: "构建输出目录",
+ },
+ {
+ name: "pom.xml",
+ type: "file",
+ description: "Maven 项目配置文件",
+ },
+ {
+ name: "README.md",
+ type: "file",
+ description: "项目说明文件",
+ },
+ ],
+ },
+];
diff --git a/src/data/structures/nukitServerStructure.ts b/src/data/structures/nukitServerStructure.ts
new file mode 100644
index 000000000..ae205b9d2
--- /dev/null
+++ b/src/data/structures/nukitServerStructure.ts
@@ -0,0 +1,104 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const nukitServerStructure: ExplorerNode[] = [
+ {
+ name: "Nukkit Server/",
+ type: "folder",
+ children: [
+ {
+ name: "nukkit-1.0-SNAPSHOT.jar",
+ type: "file",
+ description: "服务器核心",
+ },
+ {
+ name: "start.bat",
+ type: "file",
+ description: "Windows 运行脚本",
+ },
+ {
+ name: "start.sh",
+ type: "file",
+ description: "Linux 运行脚本",
+ },
+ {
+ name: "start.command",
+ type: "file",
+ description: "macOS 运行脚本",
+ },
+ {
+ name: "server.properties",
+ type: "file",
+ description: "服务端配置文件",
+ },
+ {
+ name: "permissions.yml",
+ type: "file",
+ description: "用于设置玩家权限的",
+ },
+ {
+ name: "banned-players.txt",
+ type: "file",
+ description: "存储被封禁的玩家名单的",
+ },
+ {
+ name: "banned-ips.txt",
+ type: "file",
+ description: "存储被封禁的 IP 地址",
+ },
+ {
+ name: "ops.txt",
+ type: "file",
+ description: "用于设置管理员(OP)的",
+ },
+ {
+ name: "worlds/",
+ type: "folder",
+ description: "主世界文件夹",
+ children: [
+ {
+ name: "world/",
+ type: "folder",
+ description: "世界存档",
+ children: [
+ {
+ name: "level.dat",
+ type: "file",
+ description: "存档设定",
+ },
+ {
+ name: "region/",
+ type: "folder",
+ description: "存储世界区块数据",
+ },
+ {
+ name: "entities/",
+ type: "folder",
+ description: "存储世界中的实体数据",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "plugins/",
+ type: "folder",
+ description: "插件存放文件夹",
+ },
+ {
+ name: "logs/",
+ type: "folder",
+ description: "服务器日志存放",
+ },
+ {
+ name: "whitelist.txt",
+ type: "file",
+ description: "存储允许加入服务器的玩家名单",
+ },
+ {
+ name: "rcon_password.txt",
+ type: "file",
+ description: "存储 RCON(远程控制)功能的密码",
+ },
+ ],
+ },
+];
diff --git a/src/data/structures/serverDirStructureData.ts b/src/data/structures/serverDirStructureData.ts
new file mode 100644
index 000000000..b3707ea19
--- /dev/null
+++ b/src/data/structures/serverDirStructureData.ts
@@ -0,0 +1,222 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const serverDirStructureData: ExplorerNode[] = [
+ {
+ name: "assets",
+ type: "folder",
+ description: "储存 Minecraft 音效贴图等重要文件,不要乱动"
+ },
+ {
+ name: "cache",
+ type: "folder",
+ description: "缓存文件夹,一般放置 Minecraft 原版服务器"
+ },
+ {
+ name: "config",
+ type: "folder",
+ description: "Paper fork 服务器特有的配置文件,用于放置 Paper 的配置文件"
+ },
+ {
+ name: "crash-reports",
+ type: "folder",
+ description: "存放服务器崩溃的完整报告"
+ },
+ {
+ name: "libraries",
+ type: "folder",
+ description: "存放服务器及部分插件的依赖库"
+ },
+ {
+ name: "logs",
+ type: "folder",
+ description: "存放服务端日志的文件夹"
+ },
+ {
+ name: "plugins",
+ type: "folder",
+ description: "存放插件的文件夹"
+ },
+ {
+ name: "versions",
+ type: "folder",
+ description: "存放对应版本需要的依赖 jar"
+ },
+ {
+ name: "world",
+ type: "folder",
+ description: "主世界文件夹",
+ children: [
+ {
+ name: "advancements",
+ type: "folder",
+ description: "成就文件夹"
+ },
+ {
+ name: "data",
+ type: "folder",
+ description: "世界数据文件夹"
+ },
+ {
+ name: "datapacks",
+ type: "folder",
+ description: "数据包",
+ children: [
+ {
+ name: "bukkit",
+ type: "folder"
+ }
+ ]
+ },
+ {
+ name: "entities",
+ type: "folder",
+ description: "实体数据"
+ },
+ {
+ name: "playerdata",
+ type: "folder",
+ description: "玩家数据"
+ },
+ {
+ name: "poi",
+ type: "folder",
+ description: "兴趣点数据"
+ },
+ {
+ name: "region",
+ type: "folder",
+ description: "区块数据"
+ },
+ {
+ name: "stats",
+ type: "folder",
+ description: "统计信息"
+ }
+ ]
+ },
+ {
+ name: "world_nether",
+ type: "folder",
+ description: "地狱世界文件夹",
+ children: [
+ {
+ name: "DIM-1",
+ type: "folder",
+ children: [
+ { name: "data", type: "folder" },
+ { name: "entities", type: "folder" },
+ { name: "poi", type: "folder" },
+ { name: "region", type: "folder" }
+ ]
+ }
+ ]
+ },
+ {
+ name: "world_the_end",
+ type: "folder",
+ description: "末地世界文件夹",
+ children: [
+ {
+ name: "DIM1",
+ type: "folder",
+ children: [
+ { name: "data", type: "folder" },
+ { name: "entities", type: "folder" },
+ { name: "poi", type: "folder" },
+ {
+ name: "region",
+ type: "folder"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ name: ".console_history",
+ type: "file",
+ description:
+ "存放了控制台 (又叫后台) 曾经使用过的指令,方便你使用键盘中的 ↑ 键快捷查找曾使用的指令,也可用于查看后台异常。"
+ },
+ {
+ name: "banned-ips.json",
+ type: "file",
+ description:
+ "以 JSON 格式存放的被 ban IP 玩家的 UUID 及游戏名称等相关信息,一旦玩家被 banip,此 IP 将无法再进入服务器。"
+ },
+ {
+ name: "banned-players.json",
+ type: "file",
+ description:
+ "以 JSON 格式存放了被 ban 玩家的 UUID 及游戏名称等相关信息,离线服 ban 玩家后换 ID 即可进入服务器,而正版服无法通过改名重新进入服务器。"
+ },
+ {
+ name: "bukkit.yml",
+ type: "file",
+ description: "由 Bukkit 派生得到的服务端都有的文件。保存着 Bukkit 所提供的最基本的设置选项。"
+ },
+ {
+ name: "commands.yml",
+ type: "file",
+ description:
+ "它提供了一种快速而简单的方法来强制服务器使用 Mojang 提供的命令 (而不是 Bukkit 中内置的命令) 而不产生冲突。"
+ },
+ {
+ name: "eula.txt",
+ type: "file",
+ description: "在首次开服的时候,我们需要同意 EULA 协议。"
+ },
+ {
+ name: "help.yml",
+ type: "file",
+ description: "一些插件的帮助信息会出现在这里面,一般不需要进行什么修改。"
+ },
+ {
+ name: "ops.json",
+ type: "file",
+ description: "以 JSON 格式存放了 OP 玩家的 UUID 及游戏名称等相关信息。"
+ },
+ {
+ name: "purpur.jar",
+ type: "file",
+ description: "你可以改名叫任何名字 (只要以 `.jar` 结尾,且在启动脚本中对应修改)"
+ },
+ {
+ name: "purpur.yml",
+ type: "file",
+ description: "Purpur 服务器特有的配置文件,极其详细的配置项,功能非常丰富,几乎可以替代数款插件。"
+ },
+ {
+ name: "permissions.yml",
+ type: "file",
+ description:
+ "是默认的权限定义 YAML 文件,在启动时自动生成。它的主要功能是将权限节点组合到一个文件中,以便权限插件 (以及使用权限的插件) 可以在整个系统中使用它。"
+ },
+ {
+ name: "server.properties",
+ type: "file",
+ description: "服务端的一些基本设置就在里面,如设置端口,设置游戏难度,设置游戏模式 (生存、创造等) 等。",
+ url: "https://minecraft-zh.gamepedia.com/Server.properties",
+ external: true
+ },
+ {
+ name: "spigot.yml",
+ type: "file",
+ description: "Spigot 服务器都有的配置文件。"
+ },
+ {
+ name: "usercache.json",
+ type: "file",
+ description: "储存着用名字及 UUID 信息的缓存文件。"
+ },
+ {
+ name: "version_history",
+ type: "file",
+ description: "一些 Minecraft 和服务端核心的版本信息,一般记录着曾经使用过的版本。"
+ },
+ {
+ name: "whitelist.json",
+ type: "file",
+ description:
+ "白名单列表。(如果你在 server.properties 中开启了白名单,你就可以在该文件中添加和管理谁被允许或不被允许进入服务器。)"
+ }
+];
diff --git a/src/data/structures/viaproxyStructure.ts b/src/data/structures/viaproxyStructure.ts
new file mode 100644
index 000000000..edce8c4b5
--- /dev/null
+++ b/src/data/structures/viaproxyStructure.ts
@@ -0,0 +1,61 @@
+import { ExplorerNode } from "@/types/ExplorerNode";
+
+export const viaproxyStructure: ExplorerNode[] = [
+ {
+ name: "viaproxy/",
+ type: "folder",
+ children: [
+ {
+ name: "viaproxy.yml",
+ type: "file",
+ description: "主配置文件",
+ },
+ {
+ name: "ViaLoader/",
+ type: "folder",
+ description: "协议转换配置",
+ children: [
+ {
+ name: "viaversion.yml",
+ type: "file",
+ },
+ {
+ name: "viabackwards.yml",
+ type: "file",
+ },
+ {
+ name: "viarewind.yml",
+ type: "file",
+ },
+ {
+ name: "vialegacy.yml",
+ type: "file",
+ },
+ {
+ name: "viabedrock.yml",
+ type: "file",
+ },
+ {
+ name: "viaaprilfools.yml",
+ type: "file",
+ },
+ ],
+ },
+ {
+ name: "plugins/",
+ type: "folder",
+ description: "插件目录",
+ },
+ {
+ name: "logs/",
+ type: "folder",
+ description: "日志目录",
+ },
+ {
+ name: "saves.json",
+ type: "file",
+ description: "服务器保存数据",
+ },
+ ],
+ },
+];
diff --git a/src/types/ExplorerNode.ts b/src/types/ExplorerNode.ts
new file mode 100644
index 000000000..98969b810
--- /dev/null
+++ b/src/types/ExplorerNode.ts
@@ -0,0 +1,35 @@
+export type ExplorerNode = FolderNode | FileNode | StructureNode;
+
+/**
+ * 文件夹节点
+ */
+export interface FolderNode {
+ name: string;
+ type: "folder";
+ children?: ExplorerNode[];
+ description?: string;
+ url?: string;
+ external?: boolean;
+}
+
+/**
+ * 文件节点
+ */
+export interface FileNode {
+ name: string;
+ type: "file";
+ description?: string;
+ url?: string;
+ external?: boolean;
+}
+
+/**
+ * 结构节点
+ */
+export interface StructureNode {
+ name: string;
+ type: "structure";
+ children?: ExplorerNode[];
+ external?: boolean;
+ description?: string;
+}
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index 0cd5024c9..df7b65199 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,6 +1,7 @@
{
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
+ "baseUrl": "./",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"strict": true,