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.
Diese Klasse importieren
Link to diese-klasse-importieren
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 Copyimport 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
Methoden
Link to methoden
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();
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();
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();
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();
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();
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();
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();
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();
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();