Skip to content

release: JavaScript@v2.17.0 #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platforms/javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@levimc-lse/types",
"version": "2.16.3",
"version": "2.17.0",
"description": "TypeScript declaration files for the Legacy Script Engine.",
"types": "src/index.d.ts",
"files": [
Expand Down
60 changes: 48 additions & 12 deletions platforms/javascript/src/GameAPI/Block/mc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,64 @@ declare namespace mc {
* 通过此函数,将一个坐标对应的方块设置成另一个,类似于命令 `/setblock`
*
* @param pos 目标方块位置
* @param block 要设置成的方块对象、方块标准类型名(如`minecraft:stone`)或方块NBT数据
* @param tileData 方块状态值,同原版 `/setBlock` 指令的 `tiledata`,默认为`0`,仅通过方块类型名放置方块时有效
* @param blockObject 要设置成的方块对象或方块 NBT 数据
*
* @returns 是否成功设置
*/
function setBlock(
pos: IntPos,
block: Block | string | NbtCompound,
tileData: number,
pos: IntPos | FloatPos,
blockObject: Block | NbtCompound
): boolean

/**
* ### 设置指定位置的方块
*
* 通过此函数,将一个坐标对应的方块设置成另一个,类似于命令 `/setblock`
*
* @param x 方块x坐标
* @param y 方块y坐标
* @param z 方块z坐标
* @param pos 目标方块位置
* @param blockString 方块标准类型名(如`minecraft:stone`)
* @param tileData 方块状态值,同原版 `/setBlock` 指令的 `tileData`,默认为 `0`,仅通过方块类型名放置方块时有效
*
* @returns 是否成功设置
*/
function setBlock(
pos: IntPos | FloatPos,
blockString: string,
tileData: number
): boolean

/**
* ### 设置指定位置的方块
*
* 通过此函数,将一个坐标对应的方块设置成另一个,类似于命令 `/setblock`
*
* @param x 方块 x 坐标
* @param y 方块 y 坐标
* @param z 方块 z 坐标
* @param dimId 方块维度
* @param blockObject 要设置成的方块对象或方块 NBT 数据
*
* @returns 是否成功设置
*/
function setBlock(
x: number,
y: number,
z: number,
dimId: 0 | 1 | 2,
blockObject: Block | NbtCompound
): boolean

/**
* ### 设置指定位置的方块
*
* 通过此函数,将一个坐标对应的方块设置成另一个,类似于命令 `/setblock`
*
* @param x 方块 x 坐标
* @param y 方块 y 坐标
* @param z 方块 z 坐标
* @param dimId 方块维度
* @param block 要设置成的方块对象、方块标准类型名(如`minecraft:stone`)或方块NBT数据
* @param tileData 方块状态值,同原版 `/setBlock` 指令的 `tiledata`,默认为`0`,仅通过方块类型名放置方块时有效
* @param blockString 方块标准类型名(如`minecraft:stone`)
* @tileData 方块状态值,同原版 `/setBlock` 指令的 `tileData`,默认为 `0`,仅通过方块类型名放置方块时有效
*
* @returns 是否成功设置
*/
Expand All @@ -66,8 +102,8 @@ declare namespace mc {
y: number,
z: number,
dimId: 0 | 1 | 2,
block: Block | string | NbtCompound,
tileData: number,
blockString: string,
tileData: number
): boolean

/**
Expand Down
8 changes: 8 additions & 0 deletions platforms/javascript/src/ScriptAPI/Li.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ declare namespace ll {
/** 当前版本是否为发布版本 */
const isRelease: boolean

/** LeviLamina 插件的根目录 */
const pluginsRoot: string

/**
* 获取 LiteLoader 加载器版本
* @returns 加载器版本对象
Expand Down Expand Up @@ -90,6 +93,11 @@ declare namespace ll {
*/
function getPluginInfo(name: string): Plugin

/**
* 获取当前插件的信息
*/
function getCurrentPluginInfo(): Plugin

/**
* 列出所有已加载的插件
* @returns 列出所有已加载的插件
Expand Down
Loading