@minecraft/server / EnchantWithLevelsFunction
Class: EnchantWithLevelsFunction ​
Defined in: @minecraft/server/index.d.ts:8413
Loot item function that applies a random enchant to the dropped item.
Extends ​
Properties ​
conditions ​
readonlyconditions:LootItemCondition[]
Defined in: @minecraft/server/index.d.ts:15793
Inherited from ​
levels ​
readonlylevels:NumberRange
Defined in: @minecraft/server/index.d.ts:8422
Remarks ​
The value range from which the function randomly chooses the level of enchantment to apply. Contains minimum and maximum values.
treasure ​
readonlytreasure:boolean
Defined in: @minecraft/server/index.d.ts:8429
Remarks ​
Value that determines whether or not treasure enchants should be included in the random enchant selection.