EntityFlagsPredicate

Link to 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.

Importare la Classe

Link to importare-la-classe

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.EntityFlagsPredicate;

Extending AnyDefaultingVanillaWrappingPredicate

Link to extending-anydefaultingvanillawrappingpredicate

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

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withAdult() as EntityFlagsPredicate

myEntityFlagsPredicate.withAdult();

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withBaby() as EntityFlagsPredicate

myEntityFlagsPredicate.withBaby();

Link to withBurningState

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withBurningState() as EntityFlagsPredicate

myEntityFlagsPredicate.withBurningState();

Link to withSneakingState

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withSneakingState() as EntityFlagsPredicate

myEntityFlagsPredicate.withSneakingState();

Link to withSprintingState

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withSprintingState() as EntityFlagsPredicate

myEntityFlagsPredicate.withSprintingState();

Link to withSwimmingState

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withSwimmingState() as EntityFlagsPredicate

myEntityFlagsPredicate.withSwimmingState();

Link to withoutBurningState

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withoutBurningState() as EntityFlagsPredicate

myEntityFlagsPredicate.withoutBurningState();

Link to withoutSneakingState

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withoutSneakingState() as EntityFlagsPredicate

myEntityFlagsPredicate.withoutSneakingState();

Link to withoutSprintingState

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withoutSprintingState() as EntityFlagsPredicate

myEntityFlagsPredicate.withoutSprintingState();

Link to withoutSwimmingState

Name: 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.

Returns: This predicate for chaining.
Return Type: EntityFlagsPredicate

ZenScript
Copy
// EntityFlagsPredicate.withoutSwimmingState() as EntityFlagsPredicate

myEntityFlagsPredicate.withoutSwimmingState();