enhancementgood first issue
Repository metrics
- Stars
- (0 stars)
- PR merge metrics
- (PR metrics pending)
Description
项目结构初始化
需要创建以下文件和目录结构:
.
├── src/
│ ├── types/ # TypeScript 类型定义
│ ├── utils/ # 工具函数
│ ├── readers/ # 各种数据读取器的实现
│ │ ├── LevelReader.ts # 世界基础信息读取
│ │ ├── BlockReader.ts # 方块数据读取
│ │ ├── EntityReader.ts # 实体数据读取
│ │ ├── PlayerReader.ts # 玩家数据读取
│ │ ├── ChunkReader.ts # 区块数据读取
│ │ └── BiomeReader.ts # 生物群系数据读取
│ └── index.ts # 主入口文件
├── test/
│ ├── data/ # 测试用的存档文件
│ └── __tests__/ # 测试文件
├── package.json # 项目依赖配置
├── tsconfig.json # TypeScript 配置
├── .gitignore # Git 忽略配置
└── README.md # 项目说明文档
## 需要安装的依赖
基础开发依赖:
- typescript
- @types/node
- jest
- @types/jest
- ts-jest
- leveldb-mcpe (用于读取基岩版的 LevelDB 数据)
- nbt-ts (用于解析 NBT 数据)
- zlib (用于处理压缩的存档文件)
## 配置文件内容
### package.json
```json
{
"name": "bedrock-level-reader",
"version": "1.0.0",
"description": "A tool for reading Minecraft Bedrock Edition world data",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"test": "jest",
"test:watch": "jest --watch"
},
"keywords": [
"minecraft",
"bedrock",
"level",
"reader"
],
"author": "rukiroki",
"license": "MIT"
}
tsconfig.json
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"declaration": true,
"outDir": "./dist",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
},
"include": ["src"],
"exclude": ["node_modules", "dist", "test"]
}
.gitignore
# Dependencies
node_modules/
# Build output
dist/
# Test data
test/data/*.mcworld
# Coverage
coverage/
# IDE
.vscode/
.idea/
# Logs
*.log
npm-debug.log*