ItemPredicateBuilder

Link to itempredicatebuilder

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
Copy
import crafttweaker.api.predicate.builder.ItemPredicateBuilder;

Name: amount

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.amount(amount as IntMinMaxBoundsPredicate) as ItemPredicateBuilder
参数类型
参数
amount
类型
IntMinMaxBoundsPredicate

Name: build

Return Type: ItemPredicate

ZenScript
Copy
// ItemPredicateBuilder.build() as ItemPredicate

myItemPredicateBuilder.build();

Name: durability

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.durability(durability as IntMinMaxBoundsPredicate) as ItemPredicateBuilder
参数类型
参数
durability
类型
IntMinMaxBoundsPredicate

Name: enchantedWith

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.enchantedWith(predicate as EnchantmentPredicate) as ItemPredicateBuilder
参数类型
参数
predicate
类型
EnchantmentPredicate

Name: items

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.items(items as IItemStack[]) as ItemPredicateBuilder
参数类型
参数
items
类型
IItemStack[]

Name: items

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.items(items as ItemDefinition[]) as ItemPredicateBuilder
参数类型
参数
items
类型
ItemDefinition[]

Name: nbt

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.nbt(nbt as IData) as ItemPredicateBuilder
参数类型
参数
nbt
类型
IData #数据

Name: nbt

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.nbt(nbt as MapData) as ItemPredicateBuilder
参数类型
参数
nbt
类型
MapData #地图数据

Name: potion

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.potion(potion as Potion) as ItemPredicateBuilder
参数类型
参数
potion
类型
Potion

Link to storingEnchantment

Name: storingEnchantment

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.storingEnchantment(predicate as EnchantmentPredicate) as ItemPredicateBuilder
参数类型
参数
predicate
类型
EnchantmentPredicate

Name: tag

Return Type: ItemPredicateBuilder

ZenScript
Copy
ItemPredicateBuilder.tag(tag as KnownTag<ItemDefinition>) as ItemPredicateBuilder
参数类型
参数
tag #标签
类型
KnownTag<ItemDefinition>