Expansion for IItemStack
Link to expansion-for-iitemstack
Additional methods for easier modification of item stack-related loot tables.
使用方式
Link to 使用方式
Name: addToolModifier
Adds an ILootModifier for everything that uses this item as a tool, such as block breaking.
Additional parameters that further identify the tool, such as NBT data, damage, or count, are ignored.
Return Type: void
ZenScript CopyIItemStack.addToolModifier(name as string, modifier as ILootModifier) as void
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 A name for the loot modifier. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add. |
Name: addToolModifier
Adds an ILootModifier for everything that uses this item as a tool, such as block breaking, optionally considering its damage.
Additional parameters that further identify the tool, such as NBT data, or count, are ignored.
Return Type: void
ZenScript CopyIItemStack.addToolModifier(name as string, matchDamage as boolean, modifier as ILootModifier) as void
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 A name for the loot modifier. |
参数 matchDamage | 类型 布尔值 | 描述 Whether to consider damage or not when trying to match the tool. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add. |
Name: addToolModifier
Adds an ILootModifier for everything that uses this item as a tool, such as block breaking, optionally considering its damage and count.
Additional parameters that further identify the tool, such as NBT data, are ignored.
Return Type: void
ZenScript CopyIItemStack.addToolModifier(name as string, matchDamage as boolean, matchCount as boolean, modifier as ILootModifier) as void
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 A name for the loot modifier. |
参数 matchDamage | 类型 布尔值 | 描述 Whether to consider damage or not when trying to match the tool. |
参数 matchCount | 类型 布尔值 | 描述 Whether to consider the amount or not when trying to match the tool. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add. |
Name: addToolModifier
Adds an ILootModifier for everything that uses this item as a tool, such as block breaking, optionally considering its damage, count, and NBT data.
Return Type: void
ZenScript CopyIItemStack.addToolModifier(name as string, matchDamage as boolean, matchCount as boolean, matchNbt as boolean, modifier as ILootModifier) as void
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 A name for the loot modifier. |
参数 matchDamage | 类型 布尔值 | 描述 Whether to consider damage or not when trying to match the tool. |
参数 matchCount | 类型 布尔值 | 描述 Whether to consider the amount or not when trying to match the tool. |
参数 matchNbt | 类型 布尔值 | 描述 Whether to consider NBT data or not when trying to match the tool. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add. |