Class BlockManager
Inheritance
System.Object
BlockManager
Assembly: Eco.World.dll
Syntax
public static class BlockManager : Object
Fields
GetCurrentEvent
Declaration
public static Func<string> GetCurrentEvent
Field Value
| Type |
Description |
| System.Func<System.String> |
|
Properties
BlockTypes
Declaration
public static IEnumerable<Type> BlockTypes { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Type> |
|
DestroyBlock
Declaration
public static Action<Type> DestroyBlock { get; }
Property Value
| Type |
Description |
| System.Action<System.Type> |
|
NumBlocks
Declaration
public static int NumBlocks { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
TrySetBlock
Declaration
public static Func<Type, bool> TrySetBlock { get; }
Property Value
| Type |
Description |
| System.Func<System.Type, System.Boolean> |
|
Methods
Create(Type, Object[])
Declaration
public static Block Create(Type blockType, params object[] args)
Parameters
| Type |
Name |
Description |
| System.Type |
blockType |
|
| System.Object[] |
args |
|
Returns
Create<T>(Object[])
Declaration
public static Block Create<T>(params object[] args)
where T : Block
Parameters
| Type |
Name |
Description |
| System.Object[] |
args |
|
Returns
Type Parameters
FromId(UInt16)
Declaration
public static Type FromId(ushort blockId)
Parameters
| Type |
Name |
Description |
| System.UInt16 |
blockId |
|
Returns
| Type |
Description |
| System.Type |
|
FromTypeName(String)
Declaration
public static Type FromTypeName(string s)
Parameters
| Type |
Name |
Description |
| System.String |
s |
|
Returns
| Type |
Description |
| System.Type |
|
FromTypeNameNoCase(String)
Slower than FromTypeName, should be used for cases like commands, etc.
Uses lower case comparison on both sides and applies input validation (trims all whitespaces, adds "block", etc)
Declaration
public static Type FromTypeNameNoCase(string s)
Parameters
| Type |
Name |
Description |
| System.String |
s |
|
Returns
| Type |
Description |
| System.Type |
|
GetBlockID(Type)
Declaration
public static ushort GetBlockID(Type type)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
Returns
| Type |
Description |
| System.UInt16 |
|
IsShared(Type)
Declaration
public static bool IsShared(Type type)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
Returns
| Type |
Description |
| System.Boolean |
|
SetBlockTestFuncs(Func<Type, Boolean>, Action<Type>)
Declaration
public static void SetBlockTestFuncs(Func<Type, bool> func, Action<Type> destroyBlock)
Parameters
| Type |
Name |
Description |
| System.Func<System.Type, System.Boolean> |
func |
|
| System.Action<System.Type> |
destroyBlock |
|
ToBson()
Declaration
public static BSONObject ToBson()
Returns
TryConvert(Block, out Block)
Declaration
public static bool TryConvert(Block block, out Block convert)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|