Skip to content

Class ResourceLocation

The Minecraft used object to map the game resource location.

🏭 Constructors

constructor

ts
new ResourceLocation(domain: string, path: string): ResourceLocation

Parameters

  • domain: string
  • path: string

Return Type

  • ResourceLocation

Defined in: packages/resourcepack/resourcePack.ts:82

🏷️ Properties

domain readonly

ts
domain: string

Defined in: packages/resourcepack/resourcePack.ts:83

path readonly

ts
path: string

Defined in: packages/resourcepack/resourcePack.ts:84

🔧 Methods

toString

ts
toString(): string

Return Type

  • string

Defined in: packages/resourcepack/resourcePack.ts:86

deconstruct static

ts
deconstruct(path: string, appendPath: string= ''): ResourceLocation

Parameters

  • path: string
  • appendPath: string

Return Type

  • ResourceLocation

Defined in: packages/resourcepack/resourcePack.ts:18

fromPath static

ts
fromPath(location: string | ResourceLocation): ResourceLocation

from absoluted path

Parameters

  • location: string | ResourceLocation

Return Type

  • ResourceLocation

Defined in: packages/resourcepack/resourcePack.ts:73

getAssetsPath static

ts
getAssetsPath(location: string | ResourceLocation): string

Parameters

  • location: string | ResourceLocation

Return Type

  • string

Defined in: packages/resourcepack/resourcePack.ts:77

ofBlockModelPath static

ts
ofBlockModelPath(location: string | ResourceLocation): ResourceLocation

build from model path

Parameters

  • location: string | ResourceLocation

Return Type

  • ResourceLocation

Defined in: packages/resourcepack/resourcePack.ts:47

ofBlockStatePath static

ts
ofBlockStatePath(location: string | ResourceLocation): ResourceLocation

build from block state path

Parameters

  • location: string | ResourceLocation

Return Type

  • ResourceLocation

Defined in: packages/resourcepack/resourcePack.ts:65

ofItemModelPath static

ts
ofItemModelPath(location: string | ResourceLocation): ResourceLocation

Parameters

  • location: string | ResourceLocation

Return Type

  • ResourceLocation

Defined in: packages/resourcepack/resourcePack.ts:52

ofModelPath static

ts
ofModelPath(location: string | ResourceLocation): ResourceLocation

Parameters

  • location: string | ResourceLocation

Return Type

  • ResourceLocation

Defined in: packages/resourcepack/resourcePack.ts:57

ofTexturePath static

ts
ofTexturePath(location: string | ResourceLocation): ResourceLocation

build from texture path

Parameters

  • location: string | ResourceLocation

Return Type

  • ResourceLocation

Defined in: packages/resourcepack/resourcePack.ts:39