Class WorldReader
🏭 Constructors
constructor
ts
new WorldReader(fs: FileSystem): WorldReader
Parameters
- fs:
FileSystem
Return Type
WorldReader
Defined in: packages/game-data/level.ts:126
🏷️ Properties
fs
ts
fs: FileSystem
Defined in: packages/game-data/level.ts:126
🔧 Methods
getAdvancementsData
ts
getAdvancementsData(): Promise<AdvancementDataFrame[]>
Return Type
Promise<AdvancementDataFrame[]>
Defined in: packages/game-data/level.ts:187
getEntityData
ts
getEntityData(chunkX: number, chunkZ: number): Promise<RegionDataFrame>
Get entity data frame
Parameters
- chunkX:
number
The x value of chunk coord - chunkZ:
number
The z value of chunk coord
Return Type
Promise<RegionDataFrame>
Defined in: packages/game-data/level.ts:142
getLevelData
ts
getLevelData(): Promise<LevelDataFrame>
Read the level data
Return Type
Promise<LevelDataFrame>
Defined in: packages/game-data/level.ts:175
getMCAData
ts
getMCAData(prefix: string, chunkX: number, chunkZ: number): Promise<RegionDataFrame>
Get mca data frame
Parameters
- prefix:
string
The folder to load the .mca file from - chunkX:
number
The x value of chunk coord - chunkZ:
number
The z value of chunk coord
Return Type
Promise<RegionDataFrame>
Defined in: packages/game-data/level.ts:154
getPlayerData
ts
getPlayerData(): Promise<PlayerDataFrame[]>
Return Type
Promise<PlayerDataFrame[]>
Defined in: packages/game-data/level.ts:181
getRegionData
ts
getRegionData(chunkX: number, chunkZ: number): Promise<RegionDataFrame>
Get region data frame
Parameters
- chunkX:
number
The x value of chunk coord - chunkZ:
number
The z value of chunk coord
Return Type
Promise<RegionDataFrame>
Defined in: packages/game-data/level.ts:132
create
ts
create(path: string | Uint8Array): Promise<WorldReader>
Parameters
- path:
string | Uint8Array
Return Type
Promise<WorldReader>
Defined in: packages/game-data/level.ts:122