Skip to content

@minecraft/server


@minecraft/server / EntityFilter

Interface: EntityFilter ​

Defined in: @minecraft/server/index.d.ts:23254

Contains options for filtering entities.

Extended by ​

Properties ​

excludeFamilies? ​

optional excludeFamilies?: string[]

Defined in: @minecraft/server/index.d.ts:23261

Remarks ​

Excludes entities that match one or more of the specified families.


excludeGameModes? ​

optional excludeGameModes?: GameMode[]

Defined in: @minecraft/server/index.d.ts:23268

Remarks ​

Excludes entities if have a specific gamemode that matches the specified gamemode.


excludeNames? ​

optional excludeNames?: string[]

Defined in: @minecraft/server/index.d.ts:23275

Remarks ​

Excludes entities that have a name that match one of the specified values.


excludeTags? ​

optional excludeTags?: string[]

Defined in: @minecraft/server/index.d.ts:23282

Remarks ​

Excludes entities with a tag that matches one of the specified values.


excludeTypes? ​

optional excludeTypes?: string[]

Defined in: @minecraft/server/index.d.ts:23288

Remarks ​

Excludes entities if they are one of the specified types.


families? ​

optional families?: string[]

Defined in: @minecraft/server/index.d.ts:23295

Remarks ​

If specified, includes entities that match all of the specified families.


gameMode? ​

optional gameMode?: GameMode

Defined in: @minecraft/server/index.d.ts:23302

Remarks ​

If specified, includes entities with a gamemode that matches the specified gamemode.


maxHorizontalRotation? ​

optional maxHorizontalRotation?: number

Defined in: @minecraft/server/index.d.ts:23309

Remarks ​

If specified, will only include entities that have at most this horizontal rotation.


maxLevel? ​

optional maxLevel?: number

Defined in: @minecraft/server/index.d.ts:23316

Remarks ​

If defined, only players that have at most this level are returned.


maxVerticalRotation? ​

optional maxVerticalRotation?: number

Defined in: @minecraft/server/index.d.ts:23323

Remarks ​

If specified, only entities that have at most this vertical rotation are returned.


minHorizontalRotation? ​

optional minHorizontalRotation?: number

Defined in: @minecraft/server/index.d.ts:23330

Remarks ​

If specified, will only include entities that have at a minimum this horizontal rotation.


minLevel? ​

optional minLevel?: number

Defined in: @minecraft/server/index.d.ts:23337

Remarks ​

If defined, only players that have at least this level are returned.


minVerticalRotation? ​

optional minVerticalRotation?: number

Defined in: @minecraft/server/index.d.ts:23344

Remarks ​

If specified, will only include entities that have at least this vertical rotation.


name? ​

optional name?: string

Defined in: @minecraft/server/index.d.ts:23350

Remarks ​

Includes entities with the specified name.


propertyOptions? ​

optional propertyOptions?: EntityQueryPropertyOptions[]

Defined in: @minecraft/server/index.d.ts:23351


scoreOptions? ​

optional scoreOptions?: EntityQueryScoreOptions[]

Defined in: @minecraft/server/index.d.ts:23358

Remarks ​

Gets/sets a collection of EntityQueryScoreOptions objects with filters for specific scoreboard objectives.


tags? ​

optional tags?: string[]

Defined in: @minecraft/server/index.d.ts:23364

Remarks ​

Includes entities that match all of the specified tags.


type? ​

optional type?: string

Defined in: @minecraft/server/index.d.ts:23370

Remarks ​

If defined, entities that match this type are included.