Class Block
Base type for all block world blocks.
Inheritance
System.Object
Block
Assembly: Eco.World.dll
Syntax
public abstract class Block : Object
Constructors
Block()
Declaration
Properties
Empty
A constant empty block that represents air.
Declaration
public static Block Empty { get; }
Property Value
Methods
BlockTypesWithAttribute(Type)
Declaration
public static IEnumerable<Type> BlockTypesWithAttribute(Type block)
Parameters
Type |
Name |
Description |
System.Type |
block |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
Get<T>()
Declaration
public T Get<T>()
where T : BlockAttribute
Returns
Type Parameters
Get<T>(Type)
Declaration
public static T Get<T>(Type blockType)
where T : BlockAttribute
Parameters
Type |
Name |
Description |
System.Type |
blockType |
|
Returns
Type Parameters
Initialize()
Declaration
public static void Initialize()
Is<T>()
Declaration
public bool Is<T>()
where T : BlockAttribute
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Is<T>(Type)
Declaration
public static bool Is<T>(Type blockType)
where T : BlockAttribute
Parameters
Type |
Name |
Description |
System.Type |
blockType |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
IsAny<T1, T2>()
Checks if Block is either T1
or T2
. More efficient than block.Is<T1>() || block.Is<T2>()
.
Declaration
public bool IsAny<T1, T2>()
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
IsWater()
Declaration
Returns
Type |
Description |
System.Boolean |
|
TryGet<T>(out T)
Declaration
public bool TryGet<T>(out T blockAttribute)
where T : BlockAttribute
Parameters
Type |
Name |
Description |
T |
blockAttribute |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Extension Methods