ILootModifier
Link to ilootmodifier
Represents a modifier that gets applied to the loot dropped by a loot table.
A modifier is something that can act on and change the loot dropped by a loot table, represented as a list of IItemStack, leveraging the original LootContext that caused the loot drop.
导入类
Link to 导入类
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.loot.modifier.ILootModifier;
使用方式
Link to 使用方式
Name: modify
Applies the modifier to the drops of a loot table.
Returns: A list containing the modified loot.
Return Type: stdlib.List<IItemStack>
ZenScript CopyILootModifier.modify(loot as stdlib.List<IItemStack>, context as LootContext) as stdlib.List<IItemStack>
参数 | 类型 | 描述 |
---|---|---|
参数 loot | 类型 stdlib.List<IItemStack> | 描述 The loot dropped by a loot table. |
参数 上下文: | 类型 LootContext | 描述 The context that caused the loot table to drop the loot. |