API - DauntlessStudio/Bedrock-Developments GitHub Wiki
- BehaviorManifest
- ClientAnimation
- ClientAnimationController
- ClientAttachable
- ClientAttachableArmorBoots
- ClientAttachableArmorChestplate
- ClientAttachableArmorHelmet
- ClientAttachableArmorLeggings
- ClientBlocks
- ClientEntity
- ClientGeometry
- ClientGeometryArmor
- ClientGeometryAttachable
- ClientItem
- ClientItemTexture
- ClientRenderController
- ClientSoundDefinitions
- ClientTerrainTexture
- Directories
- LangFile
- MCFunction
- Manifest
- MinecraftDataType
- MinecraftWorld
- NameData
- ResourceManifest
- ServerAnimation
- ServerAnimationController
- ServerBlock
- ServerDialogue
- ServerEntity
- ServerItem
- ServerLootTable
- SkinsManifest
- WorldManifest
- EntityAnimationOptions
- EntityComponentOptions
- EntityGroupOptions
- EntityPropertyOptions
- IBehaviorPack
- IClientAC
- IClientACParticleEffects
- IClientACSoundEffects
- IClientACSoundVariable
- IClientACState
- IClientAnimation
- IClientAnimationAnim
- IClientAnimationBone
- IClientAnimationController
- IClientAttachable
- IClientAttachableDescription
- IClientBlocks
- IClientBlocksEntry
- IClientEntity
- IClientEntityDescription
- IClientEntityScripts
- IClientEntitySpawnEgg
- IClientGeometry
- IClientGeometryBone
- IClientGeometryCube
- IClientGeometryNew
- IClientGeometryOld
- IClientGeometryPerFaceUV
- IClientItem
- IClientItemComponents
- IClientItemDescription
- IClientItemItem
- IClientItemTexture
- IClientSoundDefinition
- IClientSoundDefinitionSound
- IClientSoundDefinitions
- IClientTerrainTexture
- IConfigData
- IManifest
- IManifestDependencyPack
- IManifestDependencyScript
- IManifestHeader
- IManifestModule
- INewWorldOptions
- IResourcePack
- IServerAC
- IServerACState
- IServerAnimation
- IServerAnimationAnim
- IServerAnimationController
- IServerBlock
- IServerBlockComponents
- IServerBlockDescription
- IServerBlockMaterialInstance
- IServerDialogue
- IServerDialogueScene
- IServerEntity
- IServerEntityAnimationOptions
- IServerEntityComponentGroupOptions
- IServerEntityComponentGroups
- IServerEntityComponents
- IServerEntityDamageSensor
- IServerEntityDamageSensorOptions
- IServerEntityDescription
- IServerEntityEvent
- IServerEntityEvents
- IServerEntityFilters
- IServerEntityProperties
- IServerEntityPropertiesOptions
- IServerEntityTrigger
- IServerItem
- IServerItemComponents
- IServerItemDescription
- IServerItemItem
- IServerLootTable
- IServerLootTableCondition
- IServerLootTableEntry
- IServerLootTableFunction
- IServerLootTablePool
- NewAnimationControllerOptions
- NewAnimationOptions
- NewBlockOptions
- NewEntityOptions
- NewFunctionOptions
- NewItemOptions
- NewProjectOptions
- NewSoundOptions
- RawMessage
- RawMessageScore
- WorldExportOptions
- WorldNewOptions
- WorldPacksOptions
- ClientACName
- ClientAnimationName
- ClientEntityGeometryReference
- ClientEntityTexturePath
- ClientSoundCategory
- DamageType
- EffectNames
- File
- FormatVersion
- GeometryName
- Identifier
- MolangDoubleArray
- MolangOption
- MolangTripleArray
- Range
- ServerACName
- ServerAnimationName
- ServerEntityTarget
- SlotOptions
- archiveDirectory
- cache
- chalk
- copySourceDirectory
- copySourceFile
- getConfig
- getFiles
- getStringFromTemporaryFile
- implementConfig
- isObject
- mergeDeep
- non_serializable
- runProgram
- setAddonName
- setConfig
- setFiles
Ƭ ClientACName: `controller.animation.${string}`
ts/app/types/client/animation_controller.ts:6
Ƭ ClientAnimationName: `animation.${string}`
ts/app/types/client/animation.ts:7
Ƭ ClientEntityGeometryReference: `geometry.${string}`
ts/app/types/client/entity.ts:14
Ƭ ClientEntityTexturePath: `textures/${string}`
ts/app/types/client/entity.ts:13
Ƭ ClientSoundCategory: "ambient" | "block" | "bottle" | "bucket" | "hostile" | "music" | "neutral" | "player" | "record" | "ui" | "weather"
ts/app/types/client/sound_definitions.ts:6
Ƭ DamageType: string
ts/app/types/server/entity.ts:9
Ƭ EffectNames: "speed" | "slowness" | "haste" | "mining_fatigue" | "strength" | "instant_health" | "instant_damage" | "jump_boost" | "regeneration" | "resistance" | "fire_resistance" | "water_breathing" | "invisibility" | "blindness" | "night_vision" | "hunger" | "weakness" | "poison" | "wither" | "health_boost" | "absorptoin" | "saturation" | "levitation" | "fatal_poison" | "slow_falling" | "conduit_power" | "bad_omen" | "village_hero" | "darkness"
ts/app/types/shared_types.ts:7
Ƭ File: Object
Remarks
File Representation, contains the file path, file contents, and how to handle existing files.
| Name | Type |
|---|---|
fileContents |
string |
filePath |
string |
handleExisting? |
"overwrite" | "overwrite_silent"
|
Ƭ FormatVersion: `${number}.${number}.${number}`
ts/app/types/shared_types.ts:1
Ƭ GeometryName: `geometry.${string}`
ts/app/types/client/geometry.ts:6
Ƭ Identifier: `${string}:${string}`
ts/app/types/shared_types.ts:2
Ƭ MolangDoubleArray: [number | string, number | string]
ts/app/types/shared_types.ts:4
Ƭ MolangOption: string | Record<string, string>
ts/app/types/shared_types.ts:3
Ƭ MolangTripleArray: [number | string, number | string, number | string]
ts/app/types/shared_types.ts:5
Ƭ Range: number | [number, number]
ts/app/types/server/entity.ts:10
Ƭ ServerACName: `controller.animation.${string}`
ts/app/types/server/animation_controller.ts:6
Ƭ ServerAnimationName: `animation.${string}`
ts/app/types/server/animation.ts:6
Ƭ ServerEntityTarget: "block" | "damager" | "other" | "parent" | "player" | "self" | "target"
ts/app/types/server/entity.ts:11
Ƭ SlotOptions: "slot.weapon.mainhand" | "slot.weapon.offhand" | "slot.armor.head" | "slot.armor.chest" | "slot.armor.legs" | "slot.armor.feet" | "slot.hotbar" | "slot.inventory" | "slot.enderchest" | "slot.saddle" | "slot.armor" | "slot.chest" | "slot.equippable"
ts/app/types/shared_types.ts:6
• Const MOJANG: string
• Const currentFormatVersion: "1.20.50"
Remarks
The format version shared by all Minecraft Types.
▸ archiveDirectory(dir, zipPath, callback): void
| Name | Type | Description |
|---|---|---|
dir |
string |
The directory to archive. |
zipPath |
string |
The path the directory should be archived to. |
callback |
Function |
A callback to run when the directory finishes archiving. |
void
Remarks
Archives a directory, compressing to a .zip or .mcworld for example.
▸ cache(target, propertyName, descriptor): void
| Name | Type |
|---|---|
target |
any |
propertyName |
string |
descriptor |
PropertyDescriptor |
void
▸ chalk(...text): string
| Name | Type |
|---|---|
...text |
unknown[] |
string
Remarks
A globally accessible instance of the Chalk class that provides colored text in the terminal.
▸ copySourceDirectory(src, dest): void
| Name | Type | Description |
|---|---|---|
src |
string |
The path to a source directory within this module's src. |
dest |
string |
The filepath to the destination where the directory should be copied to. |
void
Remarks
Copies a source directory from this module to a destination.
▸ copySourceFile(sourceFile, targetPath, handleExisting?): void
| Name | Type | Description |
|---|---|---|
sourceFile |
string |
The filepath to a source file within this module's src. |
targetPath |
string |
The filepath to the destination the file should be copied to. |
handleExisting? |
"overwrite" | "overwrite_silent"
|
How to handle existing files. Undefined will not overwrite, 'overwite' replaces the file with this object, 'overwrite_silent' does the same with no terminal log. |
void
Remarks
Copies a source file from this module to a destination.
▸ getConfig(): IConfigData | undefined
IConfigData | undefined
Remarks
Gets the config data from the working directory.
▸ getFiles(globPattern): File[]
| Name | Type | Description |
|---|---|---|
globPattern |
string |
The glob pattern to use to find files. |
File[]
An array of Files matching the pattern.
Remarks
Gets files matching a glob pattern.
Example
let files = getFiles(Directories.RESOURCE_PATH + 'texts/*.lang');▸ getStringFromTemporaryFile(): Promise<string>
Promise<string>
A promise to a string.
Remarks
Creates a temporary file, opening it in Notepad. The contents of the file will be returned when Notepad is closed.
▸ implementConfig(): void
void
▸ isObject(item): boolean
| Name | Type | Description |
|---|---|---|
item |
any |
The item to check. |
boolean
True if the item is an object.
Remarks
Determines if a value is an object or a primitive.
▸ mergeDeep(target, source): any
| Name | Type | Description |
|---|---|---|
target |
any |
The target object to merge with. |
source |
any |
The source object to merge with the target. |
any
An object with the properties of the source and target merged deeply.
Remarks
Performs a deep merge between two objects.
Example
mergeDeep({subProperty: {targetKey: 1}}, {subProperty: {sourceKey: 2}});
// Returns {subProperty: {targetKey: 1, sourceKey: 2}};▸ non_serializable(target, key): void
| Name | Type |
|---|---|
target |
any |
key |
string | symbol
|
void
▸ runProgram(): Promise<void>
Promise<void>
▸ setAddonName(addon): void
| Name | Type | Description |
|---|---|---|
addon |
string |
The addon name as <team_name>_<project_name>. |
void
Remarks
Sets the global addon data from the addon namespace.
▸ setConfig(config): void
| Name | Type | Description |
|---|---|---|
config |
IConfigData |
The config data to write. |
void
Remarks
Sets the bedrock.config.json file contents.
▸ setFiles(files): void
| Name | Type | Description |
|---|---|---|
files |
File[] |
The array of Files to write. |
void
Remarks
Writes an array of files.
Example
let files = getFiles(Directories.RESOURCE_PATH + 'texts/*.lang');
files.forEach(file => file.fileContents = ':)');
setFiles(files);