Table of Contents

Struct SmallBoolArray

Namespace
Vintagestory.API.Datastructures
Assembly
VintagestoryAPI.dll

Suitable for up to 32 bool values, though normally used only for 6. Offers most of the methods available for a bool[], so can be dropped in to existing code

public struct SmallBoolArray : IEquatable<int>
Implements
Inherited Members

Constructors

SmallBoolArray(bool[])

public SmallBoolArray(bool[] values)

Parameters

values bool[]

SmallBoolArray(int)

public SmallBoolArray(int values)

Parameters

values int

SmallBoolArray(int[])

public SmallBoolArray(int[] values)

Parameters

values int[]

Fields

OnAllSides

public const int OnAllSides = 63

Field Value

int

Properties

All

public bool All { get; }

Property Value

bool

Any

public bool Any { get; }

Property Value

bool

Horizontals

public bool Horizontals { get; }

Property Value

bool

this[int]

public bool this[int i] { get; set; }

Parameters

i int

Property Value

bool

SidesAndBase

public bool SidesAndBase { get; }

Property Value

bool

Verticals

public bool Verticals { get; }

Property Value

bool

Methods

Equals(int)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(int other)

Parameters

other int

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object o)

Parameters

o object

Returns

bool

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

Fill(bool)

public void Fill(bool b)

Parameters

b bool

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.

OnSide(BlockFacing)

public bool OnSide(BlockFacing face)

Parameters

face BlockFacing

Returns

bool

Opposite(int)

public bool Opposite(int i)

Parameters

i int

Returns

bool

ToIntArray(int)

public int[] ToIntArray(int size)

Parameters

size int

Returns

int[]

Value()

public int Value()

Returns

int

Operators

operator ==(SmallBoolArray, int)

public static bool operator ==(SmallBoolArray left, int right)

Parameters

left SmallBoolArray
right int

Returns

bool

operator !=(SmallBoolArray, int)

public static bool operator !=(SmallBoolArray left, int right)

Parameters

left SmallBoolArray
right int

Returns

bool