Table of Contents

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 ICoreAPI
tags IEnumerable<string>

BlockTagRule(BlockTagArray, BlockTagArray)

public BlockTagRule(BlockTagArray tagsThatShouldBePresent, BlockTagArray tagsThatShouldBeAbsent)

Parameters

tagsThatShouldBePresent BlockTagArray
tagsThatShouldBeAbsent BlockTagArray

Fields

Empty

public static readonly BlockTagRule Empty

Field Value

BlockTagRule

NotPrefix

public const string NotPrefix = "not-"

Field Value

string

TagsThatShouldBeAbsent

public readonly BlockTagArray TagsThatShouldBeAbsent

Field Value

BlockTagArray

TagsThatShouldBePresent

public readonly BlockTagArray TagsThatShouldBePresent

Field Value

BlockTagArray

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 BlockTagArray
rules BlockTagRule[]

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(BlockTagArray)

public bool Intersects(BlockTagArray tags)

Parameters

tags BlockTagArray

Returns

bool

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 BlockTagArray
rules BlockTagRule[]

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 ==(BlockTagRule, BlockTagRule)

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

Parameters

first BlockTagRule
second BlockTagRule

Returns

bool

operator !=(BlockTagRule, BlockTagRule)

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

Parameters

first BlockTagRule
second BlockTagRule

Returns

bool