ItemPredicateBuilder

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.predicate.builder.ItemPredicateBuilder;

Members

amount(amount as Ints) as Builder
script.zs
// Builder.amount(amount as Ints) as Builder;
myBuilder.amount(myInts);

Return Type: ItemPredicateBuilder

build() as ItemPredicate
script.zs
// Builder.build() as ItemPredicate;
myBuilder.build();

Return Type: ItemPredicate

customData(nbt as MapData) as Builder
script.zs
// Builder.customData(nbt as MapData) as Builder;
myBuilder.customData(myMapData);

Parameters:

nbt Type: MapData

Return Type: ItemPredicateBuilder

customData(nbt as IData) as Builder
script.zs
// Builder.customData(nbt as IData) as Builder;
myBuilder.customData(myIData);

Parameters:

nbt Type: IData

Return Type: ItemPredicateBuilder

durability(durability as Ints) as Builder
script.zs
// Builder.durability(durability as Ints) as Builder;
myBuilder.durability(myInts);

Parameters:

Return Type: ItemPredicateBuilder

enchantedWith(predicate as EnchantmentPredicate) as Builder
script.zs
// Builder.enchantedWith(predicate as EnchantmentPredicate) as Builder;
myBuilder.enchantedWith(myEnchantmentPredicate);

Parameters:

Return Type: ItemPredicateBuilder

items(items as Item[]) as Builder
script.zs
// Builder.items(items as Item[]) as Builder;
myBuilder.items(myItem[]);

Parameters:

items Type: ItemDefinition[]

Return Type: ItemPredicateBuilder

items(items as IItemStack[]) as Builder
script.zs
// Builder.items(items as IItemStack[]) as Builder;
myBuilder.items(myIItemStack[]);

Parameters:

items Type: IItemStack[]

Return Type: ItemPredicateBuilder

potion(potion as Potion) as Builder
script.zs
// Builder.potion(potion as Potion) as Builder;
myBuilder.potion(myPotion);

Parameters:

potion Type: Potion

Return Type: ItemPredicateBuilder

storingEnchantment(predicate as EnchantmentPredicate) as Builder
script.zs
// Builder.storingEnchantment(predicate as EnchantmentPredicate) as Builder;
myBuilder.storingEnchantment(myEnchantmentPredicate);

Parameters:

Return Type: ItemPredicateBuilder

tag(tag as KnownTag<Item>) as Builder
script.zs
// Builder.tag(tag as KnownTag<Item>) as Builder;
myBuilder.tag(myKnownTag);

Parameters:

Return Type: ItemPredicateBuilder