Table of Contents

Class TagUtil

Namespace
Vintagestory.API.Util
Assembly
VintagestoryAPI.dll
public static class TagUtil
Inheritance
TagUtil
Inherited Members

Methods

ContainsAll(ushort[], ushort[])

Checks if all requirement tags are in the sample.

public static bool ContainsAll(ushort[] requirement, ushort[] sample)

Parameters

requirement ushort[]

Must be sorted in ascending order

sample ushort[]

Must be sorted in ascending order

Returns

bool

ContainsAllFromAtLeastOne(IEnumerable<ushort[]>, ushort[])

Checks if sample contains all tags from at least one requirement group.

public static bool ContainsAllFromAtLeastOne(IEnumerable<ushort[]> requirementGroups, ushort[] sample)

Parameters

requirementGroups IEnumerable<ushort[]>

Each group must be sorted in ascending order

sample ushort[]

Must be sorted in ascending order

Returns

bool

Intersects(ushort[], ushort[])

Checks if two sorted arrays of tags have a common element.

public static bool Intersects(ushort[] first, ushort[] second)

Parameters

first ushort[]

Must be sorted in ascending order

second ushort[]

Must be sorted in ascending order

Returns

bool

IntersectsAll(IEnumerable<ushort[]>, ushort[])

Checks if sample has at least one tag from each requirement group.

public static bool IntersectsAll(IEnumerable<ushort[]> requirementGroups, ushort[] sample)

Parameters

requirementGroups IEnumerable<ushort[]>

Each group must be sorted in ascending order

sample ushort[]

Must be sorted in ascending order

Returns

bool