Skip to content

Class MinecraftFolder

The Minecraft folder structure. All method will return the path related to a minecraft root like .minecraft.

🏭 Constructors

constructor

ts
new MinecraftFolder(root: string): MinecraftFolder

Parameters

  • root: string

Return Type

  • MinecraftFolder

Defined in: packages/core/folder.ts:22

🏷️ Properties

root

ts
root: string

Defined in: packages/core/folder.ts:4, packages/core/folder.ts:22

🔑 Accessors

assets

Defined in: packages/core/folder.ts:26

lastestLog

Defined in: packages/core/folder.ts:32

launcherProfile

Defined in: packages/core/folder.ts:31

libraries

Defined in: packages/core/folder.ts:27

logs

Defined in: packages/core/folder.ts:29

maps

Defined in: packages/core/folder.ts:33

mods

Defined in: packages/core/folder.ts:24

options

Defined in: packages/core/folder.ts:30

resourcepacks

Defined in: packages/core/folder.ts:25

saves

Defined in: packages/core/folder.ts:34

screenshots

Defined in: packages/core/folder.ts:35

versions

Defined in: packages/core/folder.ts:28

🔧 Methods

getAsset

ts
getAsset(hash: string): string

Parameters

  • hash: string

Return Type

  • string

Defined in: packages/core/folder.ts:58

getAssetsIndex

ts
getAssetsIndex(versionAssets: string): string

Parameters

  • versionAssets: string

Return Type

  • string

Defined in: packages/core/folder.ts:57

getLibraryByPath

ts
getLibraryByPath(libraryPath: string): string

Parameters

  • libraryPath: string

Return Type

  • string

Defined in: packages/core/folder.ts:53

getLog

ts
getLog(fileName: string): string

Parameters

  • fileName: string

Return Type

  • string

Defined in: packages/core/folder.ts:50

getLogConfig

ts
getLogConfig(file: string): string

Parameters

  • file: string

Return Type

  • string

Defined in: packages/core/folder.ts:59

getMapIcon

ts
getMapIcon(map: string): string

Parameters

  • map: string

Return Type

  • string

Defined in: packages/core/folder.ts:52

getMapInfo

ts
getMapInfo(map: string): string

Parameters

  • map: string

Return Type

  • string

Defined in: packages/core/folder.ts:51

getMod

ts
getMod(fileName: string): string

Parameters

  • fileName: string

Return Type

  • string

Defined in: packages/core/folder.ts:49

getNativesRoot

ts
getNativesRoot(version: string): string

Parameters

  • version: string

Return Type

  • string

Defined in: packages/core/folder.ts:37

getPath

ts
getPath(path: string[]): string

Parameters

  • path: string[]

Return Type

  • string

Defined in: packages/core/folder.ts:60

getResourcePack

ts
getResourcePack(fileName: string): string

Parameters

  • fileName: string

Return Type

  • string

Defined in: packages/core/folder.ts:48

getVersionAll

ts
getVersionAll(version: string): string[]

Parameters

  • version: string

Return Type

  • string[]

Defined in: packages/core/folder.ts:41

getVersionJar

ts
getVersionJar(version: string, type: string): string

Parameters

  • version: string
  • type: string

Return Type

  • string

Defined in: packages/core/folder.ts:40

getVersionJson

ts
getVersionJson(version: string): string

Parameters

  • version: string

Return Type

  • string

Defined in: packages/core/folder.ts:39

getVersionRoot

ts
getVersionRoot(version: string): string

Parameters

  • version: string

Return Type

  • string

Defined in: packages/core/folder.ts:38

from

ts
from(location: MinecraftLocation): MinecraftFolder

Normal a Minecraft folder from a folder or string

Parameters

  • location: MinecraftLocation

Return Type

  • MinecraftFolder

Defined in: packages/core/folder.ts:14

Released under the MIT License.