Show / Hide Table of Contents

Class BlockInfo

Meta-data about a block, used mainly for saving and loading.

Inheritance
Object
BlockInfo
Namespace: Modding.Blocks
Assembly: Assembly-CSharp.dll
Syntax
public class BlockInfo

Properties

Data

Declaration
public XDataHolder Data { get; }
Property Value
Type Description
XDataHolder

Guid

Unique identifier of the block.

Declaration
public Guid Guid { get; }
Property Value
Type Description
Guid

InternalObject

Internal representation of this block's metadata.

WARNING: This is not part of the stable API and subject to change!

Declaration
public BlockInfo InternalObject { get; }
Property Value
Type Description
BlockInfo

Position

Position in world-space of the block.

Declaration
public Vector3 Position { get; set; }
Property Value
Type Description
UnityEngine.Vector3

Rotation

Rotation of the block.

Declaration
public Quaternion Rotation { get; set; }
Property Value
Type Description
UnityEngine.Quaternion

Scale

Scale of the block.

Declaration
public Vector3 Scale { get; set; }
Property Value
Type Description
UnityEngine.Vector3

Type

Type ID of the block.

Declaration
public int Type { get; }
Property Value
Type Description
Int32

Methods

Equals(Object)

Tests if the other object refers to the same block info as this one.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)

From(BlockInfo)

Returns a BlockInfo instance from its internal representation.

Declaration
public static BlockInfo From(BlockInfo info)
Parameters
Type Name Description
BlockInfo info
Returns
Type Description
BlockInfo

From(Block)

Creates a BlockInfo instance based on an existing block.

Declaration
public static BlockInfo From(Block block)
Parameters
Type Name Description
Block block
Returns
Type Description
BlockInfo

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()

ToString()

Returns a string representation of this block info, containing its GUID.

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

Operators

Equality(BlockInfo, BlockInfo)

Declaration
public static bool operator ==(BlockInfo left, BlockInfo right)
Parameters
Type Name Description
BlockInfo left
BlockInfo right
Returns
Type Description
Boolean

Inequality(BlockInfo, BlockInfo)

Declaration
public static bool operator !=(BlockInfo left, BlockInfo right)
Parameters
Type Name Description
BlockInfo left
BlockInfo right
Returns
Type Description
Boolean
Back to top Generated by DocFX