Struct BlockTagRule
- Namespace
- Vintagestory.API.Datastructures
- Assembly
- VintagestoryAPI.dll
Pair of tag arrays that is used for implementation of tag inversion
public readonly struct BlockTagRule
- Inherited Members
- Extension Methods
Constructors
BlockTagRule(ICoreAPI, IEnumerable<string>)
public BlockTagRule(ICoreAPI api, IEnumerable<string> tags)
Parameters
apiICoreAPItagsIEnumerable<string>
BlockTagRule(BlockTagArray, BlockTagArray)
public BlockTagRule(BlockTagArray tagsThatShouldBePresent, BlockTagArray tagsThatShouldBeAbsent)
Parameters
tagsThatShouldBePresentBlockTagArraytagsThatShouldBeAbsentBlockTagArray
Fields
Empty
public static readonly BlockTagRule Empty
Field Value
NotPrefix
public const string NotPrefix = "not-"
Field Value
TagsThatShouldBeAbsent
public readonly BlockTagArray TagsThatShouldBeAbsent
Field Value
TagsThatShouldBePresent
public readonly BlockTagArray TagsThatShouldBePresent
Field Value
Methods
ContainsAllFromAtLeastOne(BlockTagArray, BlockTagRule[])
Checks if blockTag contains all tags from at least one rule from rules.
public static bool ContainsAllFromAtLeastOne(BlockTagArray blockTag, BlockTagRule[] rules)
Parameters
blockTagBlockTagArrayrulesBlockTagRule[]
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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(BlockTagArray)
public bool Intersects(BlockTagArray tags)
Parameters
tagsBlockTagArray
Returns
IntersectsWithEach(BlockTagArray, BlockTagRule[])
Checks if blockTag contains at least on tag from each rule from rules.
public static bool IntersectsWithEach(BlockTagArray blockTag, BlockTagRule[] rules)
Parameters
blockTagBlockTagArrayrulesBlockTagRule[]
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(BlockTagRule, BlockTagRule)
public static bool operator ==(BlockTagRule first, BlockTagRule second)
Parameters
firstBlockTagRulesecondBlockTagRule
Returns
operator !=(BlockTagRule, BlockTagRule)
public static bool operator !=(BlockTagRule first, BlockTagRule second)
Parameters
firstBlockTagRulesecondBlockTagRule