Skip to content

ClientTerrainTexture

github-actions[bot] edited this page Jul 15, 2024 · 19 revisions

Class: ClientTerrainTexture

Remarks

The parent class for all Minecraft data types, i.e. MinecraftServerClient.

Hierarchy

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ClientTerrainTexture(filepath, template): ClientTerrainTexture

Parameters

Name Type
filepath string
template IClientTerrainTexture

Returns

ClientTerrainTexture

Overrides

MinecraftDataType.constructor

Defined in

ts/app/types/client/terrain_texture.ts:32

Properties

filePath

filePath: string

Inherited from

MinecraftDataType.filePath

Defined in

ts/app/types/minecraft.ts:23


num_mip_levels

num_mip_levels: number

Implementation of

IClientTerrainTexture.num_mip_levels

Defined in

ts/app/types/client/terrain_texture.ts:18


padding

padding: number

Implementation of

IClientTerrainTexture.padding

Defined in

ts/app/types/client/terrain_texture.ts:19


resource_pack_name

resource_pack_name: "vanilla"

Implementation of

IClientTerrainTexture.resource_pack_name

Defined in

ts/app/types/client/terrain_texture.ts:20


texture_data

texture_data: Object

Index signature

▪ [key: string]: { textures: string }

Implementation of

IClientTerrainTexture.texture_data

Defined in

ts/app/types/client/terrain_texture.ts:22


texture_name

texture_name: "atlas.items"

Implementation of

IClientTerrainTexture.texture_name

Defined in

ts/app/types/client/terrain_texture.ts:21

Accessors

DirectoryPath

get DirectoryPath(): string

Returns

string

Remarks

The directory where this type of file is kept.

Overrides

MinecraftDataType.DirectoryPath

Defined in

ts/app/types/client/terrain_texture.ts:28

Methods

addTexture

addTexture(name, textures): void

Parameters

Name Type
name string
textures string

Returns

void

Defined in

ts/app/types/client/terrain_texture.ts:65


replacer

replacer(key, value): any

Parameters

Name Type
key string
value any

Returns

any

Inherited from

MinecraftDataType.replacer

Defined in

ts/app/types/minecraft.ts:72


serialize

serialize(): string

Returns

string

A string representation of this object.

Remarks

Serializes this object to a string.

Inherited from

MinecraftDataType.serialize

Defined in

ts/app/types/minecraft.ts:63


toFile

toFile(): File

Returns

File

A File object with this MinecraftDataType's filepath, and this object serialized as the file contents.

Remarks

Creates a File object from this MinecraftDataType.

Overrides

MinecraftDataType.toFile

Defined in

ts/app/types/client/terrain_texture.ts:61


createFilePath

createFilePath(): string

Returns

string

The filepath as a string.

Remarks

Creates a filepath for this object type from a NameData.

Overrides

MinecraftDataType.createFilePath

Defined in

ts/app/types/client/terrain_texture.ts:41


createFromTemplate

createFromTemplate(): ClientTerrainTexture

Returns

ClientTerrainTexture

An instance of this data type.

Remarks

Creates a new instance of the data type using reasonable defaults from a NameData.

Overrides

MinecraftDataType.createFromTemplate

Defined in

ts/app/types/client/terrain_texture.ts:45


deserialize

deserialize<T>(create, filepath, json): T

Type parameters

Name
T

Parameters

Name Type Description
create (filePath: string, template: any) => T The child of MinecraftDataType to create.
filepath string The filepath the MinecraftDataType can be written to with toFile.
json string The source string this should be deserialized from.

Returns

T

An instance of the MinecraftDataType child provided.

Remarks

Creates an instace of a MinecraftDataType child from a source string, used in fromFile.

Inherited from

MinecraftDataType.deserialize

Defined in

ts/app/types/minecraft.ts:83


fileWithAddedTexture

fileWithAddedTexture(name, textures): File

Parameters

Name Type
name string
textures string

Returns

File

Defined in

ts/app/types/client/terrain_texture.ts:55


fromFile

fromFile<T>(create, file): T

Type parameters

Name
T

Parameters

Name Type Description
create (filePath: string, template: any) => T The child of MinecraftDataType to create.
file File The File object used to deserialize into this object.

Returns

T

An instance of the MinecraftDataType child provided.

Remarks

Crates an instance of a MinecraftDataTypeChild from a File.

Inherited from

MinecraftDataType.fromFile

Defined in

ts/app/types/minecraft.ts:108


fromPathOrTemplate

fromPathOrTemplate<T>(create, path): T

Type parameters

Name
T

Parameters

Name Type Description
create (filePath: string, template: any) => T The child of MinecraftDataType to create.
path string The filepath to create the object from.

Returns

T

The deserialized file as a child of MinecraftDataType, or this object's createFromTemplate default if the file doesn't exist.

Remarks

Creates a MinecraftDataType object from a filepath, or a template if that filepath doesn't exist.

Inherited from

MinecraftDataType.fromPathOrTemplate

Defined in

ts/app/types/minecraft.ts:118

bedrock-development

Clone this wiki locally