LootTableId
Link to loottableid
Builder for a 'LootTableId' loot condition.
This condition will test the ID of the loot table currently being queried, as specified by the LootContext. The ID is matched exactly, without any form of leeway in terms of regular expressions or prefixes.
While this condition is provided merely as a convenience, it is suggested not to rely on this condition only. Due to backwards compatibility, some loot tables may in fact lack an ID or have overlapping ones. Other conditions should be used instead.
The 'LootTableId' condition requires an ID to be built.
导入类
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.conditions.vanilla.LootTableId;
已实现的接口
Link to 已实现的接口
LootTableId implements the following interfaces. That means all methods defined in these interfaces are also available in LootTableId
使用方式
Link to 使用方式
Name: withTableId
Sets the ID of the loot table that should be targeted.
This parameter is required.
Returns: This builder for chaining.
Return Type: LootTableId
ZenScript CopyLootTableId.withTableId(location as MCResourceLocation) as LootTableId
参数 | 类型 | 描述 |
---|---|---|
参数 位置 | 类型 MCResourceLocation | 描述 The ID of the loot table to match, in MCResourceLocation form. |