EntityFlagsPredicate

Represents the predicate for an MCEntity's status flags.

The status flags indicate whether the entity is currently burning, moving and at which speed, and whether it's a baby or an adult, for the entities that have a baby form.

By default, the entity passes the check no matter what its status flags are.

Импорт класса

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.

import crafttweaker.api.predicate.EntityFlagsPredicate;

Extending AnyDefaultingVanillaWrappingPredicate

EntityFlagsPredicate extends AnyDefaultingVanillaWrappingPredicate. That means all methods available in AnyDefaultingVanillaWrappingPredicate are also available in EntityFlagsPredicate

Methods

withAdult

Indicates that the entity must be in its adult form.

If the predicate has already been set to check for the entity in its baby form, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withAdult() as EntityFlagsPredicate
myEntityFlagsPredicate.withAdult();

withBaby

Indicates that the entity must be in its baby form, if applicable.

If the predicate has already been set to check for the entity in its adult form, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withBaby() as EntityFlagsPredicate
myEntityFlagsPredicate.withBaby();

withBurningState

Indicates that the entity must be on fire.

If the predicate had already been set to check the opposite condition, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withBurningState() as EntityFlagsPredicate
myEntityFlagsPredicate.withBurningState();

withSneakingState

Indicates that the entity must be sneaking, if applicable to the current entity.

If the predicate had already been set to check the opposite condition, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withSneakingState() as EntityFlagsPredicate
myEntityFlagsPredicate.withSneakingState();

withSprintingState

Indicates that the entity must be sprinting, if applicable to the current entity.

If the predicate had already been set to check the opposite condition, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withSprintingState() as EntityFlagsPredicate
myEntityFlagsPredicate.withSprintingState();

withSwimmingState

Indicates that the entity must be swimming.

If the predicate had already been set to check the opposite condition, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withSwimmingState() as EntityFlagsPredicate
myEntityFlagsPredicate.withSwimmingState();

withoutBurningState

Indicates that the entity must not be on fire.

If the predicate had already been set to check the opposite condition, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withoutBurningState() as EntityFlagsPredicate
myEntityFlagsPredicate.withoutBurningState();

withoutSneakingState

Indicates that the entity must not be sneaking.

If the predicate had already been set to check the opposite condition, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withoutSneakingState() as EntityFlagsPredicate
myEntityFlagsPredicate.withoutSneakingState();

withoutSprintingState

Indicates that the entity must not be sprinting.

If the predicate had already been set to check the opposite condition, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withoutSprintingState() as EntityFlagsPredicate
myEntityFlagsPredicate.withoutSprintingState();

withoutSwimmingState

Indicates that the entity must not be swimming.

If the predicate had already been set to check the opposite condition, the setting will be overwritten.

Return Type: EntityFlagsPredicate

EntityFlagsPredicate.withoutSwimmingState() as EntityFlagsPredicate
myEntityFlagsPredicate.withoutSwimmingState();