Table of Contents

Class MultiblockStructure

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

You can export one of these by making a selection with worldedit, looking at the center block (which should be your controller/master) then typing /we mgencode. Please note, air blocks are not exported

public class MultiblockStructure
Inheritance
MultiblockStructure
Inherited Members

Fields

BlockNumbers

public Dictionary<AssetLocation, int> BlockNumbers

Field Value

Dictionary<AssetLocation, int>

HighlightSlotId

public static int HighlightSlotId

Field Value

int

Offsets

public List<BlockOffsetAndNumber> Offsets

Field Value

List<BlockOffsetAndNumber>

OffsetsOrientation

public string OffsetsOrientation

Field Value

string

Methods

ClearHighlights(IWorldAccessor, IPlayer)

public void ClearHighlights(IWorldAccessor world, IPlayer player)

Parameters

world IWorldAccessor
player IPlayer

GetOrCreateBlockNumber(Block)

public int GetOrCreateBlockNumber(Block block)

Parameters

block Block

Returns

int

HighlightIncompleteParts(IWorldAccessor, IPlayer, BlockPos)

public void HighlightIncompleteParts(IWorldAccessor world, IPlayer player, BlockPos centerPos)

Parameters

world IWorldAccessor
player IPlayer
centerPos BlockPos

InCompleteBlockCount(IWorldAccessor, BlockPos, PositionMismatchDelegate)

Check if the multiblock structure is complete. Ignores air blocks

public int InCompleteBlockCount(IWorldAccessor world, BlockPos centerPos, PositionMismatchDelegate onMismatch = null)

Parameters

world IWorldAccessor
centerPos BlockPos
onMismatch PositionMismatchDelegate

Returns

int

InitForUse(float)

public void InitForUse(float rotateYDeg)

Parameters

rotateYDeg float

WalkMatchingBlocks(IWorldAccessor, BlockPos, Action<Block, BlockPos>)

public void WalkMatchingBlocks(IWorldAccessor world, BlockPos centerPos, Action<Block, BlockPos> onBlock)

Parameters

world IWorldAccessor
centerPos BlockPos
onBlock Action<Block, BlockPos>