ClientTerrainTexture - DauntlessStudio/Bedrock-Developments GitHub Wiki
Remarks
The parent class for all Minecraft data types, i.e. MinecraftServerClient.
-
↳
ClientTerrainTexture
- addTexture
- replacer
- serialize
- toFile
- createFilePath
- createFromTemplate
- deserialize
- fileWithAddedTexture
- fromFile
- fromPathOrTemplate
• new ClientTerrainTexture(filepath
, template
): ClientTerrainTexture
Name | Type |
---|---|
filepath |
string |
template |
IClientTerrainTexture |
ts/app/types/client/terrain_texture.ts:32
• filePath: string
• num_mip_levels: number
IClientTerrainTexture.num_mip_levels
ts/app/types/client/terrain_texture.ts:18
• padding: number
ts/app/types/client/terrain_texture.ts:19
• resource_pack_name: "vanilla"
IClientTerrainTexture.resource_pack_name
ts/app/types/client/terrain_texture.ts:20
• texture_data: Object
▪ [key: string
]: { textures
: string
}
IClientTerrainTexture.texture_data
ts/app/types/client/terrain_texture.ts:22
• texture_name: "atlas.items"
IClientTerrainTexture.texture_name
ts/app/types/client/terrain_texture.ts:21
• get
DirectoryPath(): string
string
Remarks
The directory where this type of file is kept.
MinecraftDataType.DirectoryPath
ts/app/types/client/terrain_texture.ts:28
▸ addTexture(name
, textures
): void
Name | Type |
---|---|
name |
string |
textures |
string |
void
ts/app/types/client/terrain_texture.ts:65
▸ replacer(key
, value
): any
Name | Type |
---|---|
key |
string |
value |
any |
any
▸ serialize(): string
string
A string representation of this object.
Remarks
Serializes this object to a string.
▸ toFile(): 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.
ts/app/types/client/terrain_texture.ts:61
▸ createFilePath(): string
string
The filepath as a string.
Remarks
Creates a filepath for this object type from a NameData.
MinecraftDataType.createFilePath
ts/app/types/client/terrain_texture.ts:41
▸ createFromTemplate(): ClientTerrainTexture
An instance of this data type.
Remarks
Creates a new instance of the data type using reasonable defaults from a NameData.
MinecraftDataType.createFromTemplate
ts/app/types/client/terrain_texture.ts:45
▸ deserialize<T
>(create
, filepath
, json
): T
Name |
---|
T |
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. |
T
An instance of the MinecraftDataType child provided.
Remarks
Creates an instace of a MinecraftDataType child from a source string, used in fromFile.
▸ fileWithAddedTexture(name
, textures
): File
Name | Type |
---|---|
name |
string |
textures |
string |
ts/app/types/client/terrain_texture.ts:55
▸ fromFile<T
>(create
, file
): T
Name |
---|
T |
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. |
T
An instance of the MinecraftDataType child provided.
Remarks
Crates an instance of a MinecraftDataTypeChild from a File.
▸ fromPathOrTemplate<T
>(create
, path
): T
Name |
---|
T |
Name | Type | Description |
---|---|---|
create |
(filePath : string , template : any ) => T
|
The child of MinecraftDataType to create. |
path |
string |
The filepath to create the object from. |
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.