Table of Contents

Interface IBlockAccessorRevertable

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Provides read/write access to the blocks of a world.

public interface IBlockAccessorRevertable : IBulkBlockAccessor, IBlockAccessor
Inherited Members
Extension Methods

Properties

AvailableHistoryStates

Amount of currently stored history states

int AvailableHistoryStates { get; }

Property Value

int

CurrentHistoryState

0 = working on latest version, 1 = undo used one time, 2 = undo used 2 times, etc.

int CurrentHistoryState { get; }

Property Value

int

QuantityHistoryStates

Maximum Amount of undos you can perform. More states means more memory usage.

int QuantityHistoryStates { get; set; }

Property Value

int

Relight

Whether or not to do relighting on the chunk

bool Relight { get; set; }

Property Value

bool

Methods

BeginMultiEdit()

void BeginMultiEdit()

ChangeHistoryState(int)

1 = perform 1 undo -1 = perform 1 redo

void ChangeHistoryState(int quantity = 1)

Parameters

quantity int

CommitBlockEntityData()

void CommitBlockEntityData()

EndMultiEdit()

void EndMultiEdit()

SetHistoryStateBlock(int, int, int, int, int)

Manually set the history state of a block for the to-be-comitted history state

void SetHistoryStateBlock(int posX, int posY, int posZ, int oldBlockId, int newBlockId)

Parameters

posX int
posY int
posZ int
oldBlockId int
newBlockId int

StoreEntityMoveToHistory(BlockPos, BlockPos, Vec3i)

void StoreEntityMoveToHistory(BlockPos start, BlockPos end, Vec3i offset)

Parameters

start BlockPos
end BlockPos
offset Vec3i

StoreEntitySpawnToHistory(Entity)

void StoreEntitySpawnToHistory(Entity entity)

Parameters

entity Entity

StoreHistoryState(HistoryState)

void StoreHistoryState(HistoryState state)

Parameters

state HistoryState

Events

OnRestoreHistoryState

event Action<HistoryState, int> OnRestoreHistoryState

Event Type

Action<HistoryState, int>

OnStoreHistoryState

event Action<HistoryState> OnStoreHistoryState

Event Type

Action<HistoryState>