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/EnchantWithLevelsFunction.md.

Class: EnchantWithLevelsFunction

Beta

对掉落物品应用随机附魔的战利品物品函数。

Loot item function that applies a random enchant to the dropped item.

Extends

Properties

conditions

readonly conditions: LootItemCondition[]

Beta

Inherited from

LootItemFunction.conditions


levels

readonly levels: NumberRange

Beta

Remarks

函数从中随机选择要应用的附魔等级的值范围。包含最小值和最大值。

The value range from which the function randomly chooses the level of enchantment to apply. Contains minimum and maximum values.


treasure

readonly treasure: boolean

Beta

Remarks

确定是否将宝藏附魔包含在随机附魔选择中的值。

Value that determines whether or not treasure enchants should be included in the random enchant selection.