Options
All
  • Public
  • Public/Protected
  • All
Menu

mdkjs

Index

Type aliases

Callback

Callback<D>: (context: File<{}>) => D

Type parameters

Type declaration

    • (context: File<{}>): D
    • Parameters

      Returns D

CommandType

CommandType: "comment" | "space-line" | "difficulty" | "spawnpoint" | "summon" | "clear" | "tp" | "teleport" | "effect" | "tag" | "experience" | "enchant" | "debug" | "datapack" | "bossbar" | "defaultgamemode" | "deop" | "gamemode" | "gamerule" | "kick" | "kill" | "locate" | "op" | "pardon" | "pardon-ip" | "particle" | "playsound" | "publish" | "recipe" | "replaceitem" | "schedule" | "seed" | "setidletimeout" | "setworldspawn" | "spreadplayers" | "stop" | "stopsound" | "team" | "tell" | "msg" | "w" | "setblock" | "fill" | "clone" | "teammsg" | "time" | "trigger" | "title" | "weather" | "whitelist" | "worldborder" | "xp" | "scoreboard" | "execute" | "help" | "forceload" | "function" | "attribute" | "advancement" | "ban" | "ban-ip" | "ban-list" | "list" | "locatebiome" | "loot" | "me" | "reload" | "spectate" | "tellraw" | "say" | "data" | "save" | "save-all" | "save-off" | "save-on"

Criteria

Criteria: SingleCriteria | TeamKillCriteria | KilledByTeamCriteria | CustomCriteria

DataObject

DataObject: Record<string, unknown>

FileType

FileType: "functions" | "predicates" | "loottables" | "tags"

FilenameType

FilenameType: `${TagFileType}/${string}`

LiteralFuncType

LiteralFuncType: string | ((context: { filename: string; namespace: string }) => string)

LiteralType

LiteralType<T>: string | T

Type parameters

  • T

LiteralUnion

LiteralUnion<T, U>: T | (U & {})

Type parameters

  • T: U

  • U

ObjectMap

ObjectMap<T>: {}

Type parameters

  • T

Type declaration

  • [prop: string]: T

ObjectiveProps

ObjectiveProps: { criterion: Criteria; displayName?: string; name: string }

Type declaration

  • criterion: Criteria
  • Optional displayName?: string
  • name: string

OperationType

OperationType: "+=" | "-=" | "*=" | "/=" | "%=" | ">" | "<" | "><" | "="

PredicateItemMap

PredicateItemMap: ObjectMap<IPredicateItem>

PredicateMap

PredicateMap<D>: ObjectMap<PredicateFile<D>>

Type parameters

RecipeItem

RecipeItem: { item: ItemId } | { tag: string } | { item: ItemId }[]

RecipeItemArray

RecipeItemArray: { item: ItemId }[]

RecipeResult

RecipeResult: { count?: number; item: ItemId }

Type declaration

  • Optional count?: number
  • item: ItemId

RecipeType

RecipeType: "crafting_shaped" | "crafting_shapeless" | "stonecutting" | "smelting" | "blasting" | "smoking" | "campfire_cooking" | "smithing"

SingleArrayResult

SingleArrayResult<T>: T | T[]

Type parameters

  • T

SmeltingType

SmeltingType: "smelting" | "blasting" | "smoking" | "campfire_cooking"

TagFileType

TagFileType: "blocks" | "entity_types" | "items" | "fluids" | "functions"

Text

Text: TextTokenType & TextFunction & { create: any }

Variables

Text

Text: Text

Functions

ArgumentExpection

  • ArgumentExpection(...message: string[]): Error

ContainerExpection

  • ContainerExpection(...message: string[]): Error

FieldExpection

  • FieldExpection(...message: string[]): Error

GsonStringify

  • GsonStringify(object: any, key?: string): any

SceneExpection

  • SceneExpection(...message: string[]): Error

addAffix

  • addAffix(raw: string, char?: string): string

area

composition

  • composition(value: ComplexNbt, key?: string): string

createEntity

createEntityBlock

createItem

  • createItem(nbt: Item): NbtItem<Item>

eatChar

  • eatChar(raw: string): string
  • eatChar(raw: string, char: string): string
  • eatChar(raw: string, reg: RegExp): string

emit

  • emit(event: "init", ctx: any): void

escape

  • escape(raw: string): string

formatMCParams

  • formatMCParams(params: IMCParams): string

formatScoreRange

  • formatScoreRange(range: ScoreRange): string

getPlatform

  • getPlatform(): "web" | "worker" | "node" | "unknown"

getRandomStr

  • getRandomStr(): string

isValidDeclareName

  • isValidDeclareName(filename: string): boolean
  • 命名时名称只识别小写英文字母、数字、- _ / . 如:sys:foo/bar

    Parameters

    • filename: string

      文件名

    Returns boolean

isValidPathName

  • isValidPathName(filename: string): boolean
  • 命名时名称只识别小写英文字母、数字、-和_ /

    Parameters

    • filename: string

      文件名

    Returns boolean

isValidSpacename

  • isValidSpacename(filename: string): boolean
  • 命名空间只识别小写英文字母、数字、-、_和.

    Parameters

    • filename: string

      文件名

    Returns boolean

isValidSystemFileChar

  • isValidSystemFileChar(filename: string): boolean

location

on

  • on(event: "init", handle: PluginHandle): void

popFile

  • popFile(): void

pushFile

revise

  • revise(str: string): string

rotation

selector

setPack

  • setPack(pack: Pack): void

toHump

  • toHump(str: string): string

toJson

  • toJson(object: any): any

toLine

  • toLine(name: string): string

toLink

  • toLink(name: string): string

toPascal

  • toPascal(str: string): string

unescape

  • unescape(raw: string): string

use

  • use(pluginFunc: PluginFunc, ...args: any[]): void

useCommand

useFile

usePack

useScope

  • useScope(name: string): string

validPathName

  • validPathName(filename: string): void

versionCompare

  • versionCompare(v1: string, v2: string): 0 | 1 | -1

warn

  • warn(...msg: string[]): void

wrapScope

  • wrapScope(tagname: string, scope: string | boolean): string

Generated using TypeDoc