For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server/classes/EnchantmentTypes.md.

Class: EnchantmentTypes

Beta

包含此世界中可用的 Minecraft 附魔类型目录。

Contains a catalog of Minecraft Enchantment Types that are available in this world.

Methods

get()

static get(enchantmentId): EnchantmentType | undefined

Beta

Parameters

enchantmentId

string

附魔的标识符。例如,minecraft:flame

Identifier of the enchantment. For example, "minecraft:flame".

Returns

EnchantmentType | undefined

如果可用,返回表示指定附魔的 EnchantmentType 对象。

If available, returns an EnchantmentType object that represents the specified enchantment.

Remarks

使用指定标识符检索附魔。

Retrieves an enchantment with the specified identifier.


getAll()

static getAll(): EnchantmentType[]

Beta

Returns

EnchantmentType[]

Remarks

返回所有可用附魔类型的集合。

Returns a collection of all available enchantment types.