Table of Contents

Class BlockTypeIndex

Namespace
Shard.Gameplay.Core.Blocks
Assembly
Shard.Gameplay.Core.dll

Resolves block-type names to the BlockType store's dense registry index (Java: BlockType.getAssetMap().getIndex) — the same index delivered to the client via UpdateBlockTypes.

public sealed class BlockTypeIndex : IBlockTypeIndex
Inheritance
BlockTypeIndex
Implements
IBlockTypeIndex
Inherited Members

Constructors

BlockTypeIndex(AssetRegistry)

Resolves block-type names to the BlockType store's dense registry index (Java: BlockType.getAssetMap().getIndex) — the same index delivered to the client via UpdateBlockTypes.

public BlockTypeIndex(AssetRegistry registry)

Parameters

registry AssetRegistry

Methods

IndexOf(string)

The registry index for name, or 0 (Empty/air) when the block is unknown.

public ushort IndexOf(string name)

Parameters

name string

Returns

ushort