Table of Contents

Struct EntityTagRule

Namespace
Vintagestory.API.Datastructures
Assembly
VintagestoryAPI.dll

Pair of tag arrays that is used for implementation of tag inversion for entity ai tasks

public readonly struct EntityTagRule
Inherited Members
Extension Methods

Constructors

EntityTagRule(ICoreAPI, IEnumerable<string>)

public EntityTagRule(ICoreAPI api, IEnumerable<string> tags)

Parameters

api ICoreAPI
tags IEnumerable<string>

EntityTagRule(EntityTagArray, EntityTagArray)

public EntityTagRule(EntityTagArray tagsThatShouldBePresent, EntityTagArray tagsThatShouldBeAbsent)

Parameters

tagsThatShouldBePresent EntityTagArray
tagsThatShouldBeAbsent EntityTagArray

Fields

Empty

public static readonly EntityTagRule Empty

Field Value

EntityTagRule

NotPrefix

public const string NotPrefix = "not-"

Field Value

string

TagsThatShouldBeAbsent

public readonly EntityTagArray TagsThatShouldBeAbsent

Field Value

EntityTagArray

TagsThatShouldBePresent

public readonly EntityTagArray TagsThatShouldBePresent

Field Value

EntityTagArray

Methods

ContainsAllFromAtLeastOne(EntityTagArray, EntityTagRule[])

Checks if entityTag contains all tags from at least one rule from rules.

public static bool ContainsAllFromAtLeastOne(EntityTagArray entityTag, EntityTagRule[] rules)

Parameters

entityTag EntityTagArray
rules EntityTagRule[]

Returns

bool

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Intersects(EntityTagArray)

public bool Intersects(EntityTagArray tags)

Parameters

tags EntityTagArray

Returns

bool

IntersectsWithEach(EntityTagArray, EntityTagRule[])

Checks if entityTag contains at least on tag from each rule from rules.

public static bool IntersectsWithEach(EntityTagArray entityTag, EntityTagRule[] rules)

Parameters

entityTag EntityTagArray
rules EntityTagRule[]

Returns

bool

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(EntityTagRule, EntityTagRule)

public static bool operator ==(EntityTagRule first, EntityTagRule second)

Parameters

first EntityTagRule
second EntityTagRule

Returns

bool

operator !=(EntityTagRule, EntityTagRule)

public static bool operator !=(EntityTagRule first, EntityTagRule second)

Parameters

first EntityTagRule
second EntityTagRule

Returns

bool