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.
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.script.zs
Returns: The new AdventureModePredicate.
// AdventureModePredicate.of(predicates as List<BlockPredicate>, showInTooltip as bool) as AdventureModePredicate;AdventureModePredicate.of(myList, myBool);
Parameters:
showInTooltip: bool
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.script.zs
Returns: The new AdventureModePredicate.
// AdventureModePredicate.ofBlocks(predicates as List<Block>, showInTooltip as bool) as AdventureModePredicate;AdventureModePredicate.ofBlocks(myList, myBool);
Parameters:
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.script.zs
Returns: The new AdventureModePredicate.
// AdventureModePredicate.ofTags(predicates as List<KnownTag<Block>>, showInTooltip as bool) as AdventureModePredicate;AdventureModePredicate.ofTags(myList, myBool);
Parameters:
Return Type:
AdventureModePredicate
Getter
Gets whether the predicate should show in the tooltip.script.zs
// AdventureModePredicate.showInTooltip as boolmyAdventureModePredicate.showInTooltip
Return Type:
bool
withTooltip(tooltip as bool) as AdventureModePredicate
Sets whether the predicate should show in the tooltip.script.zs
Returns: The new AdventureModePredicate.
myAdventureModePredicate.withTooltip(myBool);
Parameters:
tooltip: bool
Type: bool
- Whether the predicate should show in the tooltip.
Return Type:
AdventureModePredicate