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
api
ICoreAPItags
IEnumerable<string>
BlockTagRule(BlockTagArray, BlockTagArray)
public BlockTagRule(BlockTagArray tagsThatShouldBePresent, BlockTagArray tagsThatShouldBeAbsent)
Parameters
tagsThatShouldBePresent
BlockTagArraytagsThatShouldBeAbsent
BlockTagArray
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
blockTag
BlockTagArrayrules
BlockTagRule[]
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe 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(BlockTagArray)
public bool Intersects(BlockTagArray tags)
Parameters
tags
BlockTagArray
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
blockTag
BlockTagArrayrules
BlockTagRule[]
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
first
BlockTagRulesecond
BlockTagRule
Returns
operator !=(BlockTagRule, BlockTagRule)
public static bool operator !=(BlockTagRule first, BlockTagRule second)
Parameters
first
BlockTagRulesecond
BlockTagRule