AdventureModePredicate

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.item.component.AdventureModePredicate;

Members

static of(predicates as List<BlockPredicate>, showInTooltip as bool) as AdventureModePredicate
Creates a new AdventureModePredicate with the given predicates and showInTooltip flag.

Returns: The new AdventureModePredicate.

script.zs
// AdventureModePredicate.of(predicates as List<BlockPredicate>, showInTooltip as bool) as AdventureModePredicate;
AdventureModePredicate.of(myList, myBool);

Parameters:

predicates Type: List<BlockPredicate> - The list of block predicates.
showInTooltip Type: bool - Whether the predicate should show in the tooltip.

Return Type: AdventureModePredicate

static ofBlocks(predicates as List<Block>, showInTooltip as bool) as AdventureModePredicate
Creates a new AdventureModePredicate with the given blocks and showInTooltip flag.

Returns: The new AdventureModePredicate.

script.zs
// AdventureModePredicate.ofBlocks(predicates as List<Block>, showInTooltip as bool) as AdventureModePredicate;
AdventureModePredicate.ofBlocks(myList, myBool);

Parameters:

predicates Type: List<Block> - The list of blocks.
showInTooltip Type: bool - Whether the predicate should show in the tooltip.

Return Type: AdventureModePredicate

static ofTags(predicates as List<KnownTag<Block>>, showInTooltip as bool) as AdventureModePredicate
Creates a new AdventureModePredicate with the given tags and showInTooltip flag.

Returns: The new AdventureModePredicate.

script.zs
// AdventureModePredicate.ofTags(predicates as List<KnownTag<Block>>, showInTooltip as bool) as AdventureModePredicate;
AdventureModePredicate.ofTags(myList, myBool);

Parameters:

predicates Type: List<KnownTag<Block>> - The list of tags.
showInTooltip Type: bool - Whether the predicate should show in the tooltip.

Return Type: AdventureModePredicate

Getter
Gets whether the predicate should show in the tooltip.
script.zs
// AdventureModePredicate.showInTooltip as bool
myAdventureModePredicate.showInTooltip

Return Type: bool

withTooltip(tooltip as bool) as AdventureModePredicate
Sets whether the predicate should show in the tooltip.

Returns: The new AdventureModePredicate.

script.zs
// AdventureModePredicate.withTooltip(tooltip as bool) as AdventureModePredicate;
myAdventureModePredicate.withTooltip(myBool);

Parameters:

tooltip Type: bool - Whether the predicate should show in the tooltip.

Return Type: AdventureModePredicate