Interface IBulkBlockAccessor
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Useful for setting many blocks at once efficiently
public interface IBulkBlockAccessor : IBlockAccessor
- Inherited Members
- Extension Methods
Properties
ReadFromStagedByDefault
If set to true, the methods GetBlock() and GetBlockId() will behave like GetStagedBlockId() until the next commit
bool ReadFromStagedByDefault { get; set; }
Property Value
StagedBlocks
The full list of staged blocks that will get commited after calling Commit()
Dictionary<BlockPos, BlockUpdate> StagedBlocks { get; }
Property Value
Methods
GetStagedBlockId(int, int, int)
Gets the block for a not yet commited block. If no block has been staged for this pos the original block is returned
int GetStagedBlockId(int posX, int posY, int posZ)
Parameters
Returns
GetStagedBlockId(BlockPos)
Gets the block for a not yet commited block. If no block has been staged for this pos the original block is returned
int GetStagedBlockId(BlockPos pos)
Parameters
pos
BlockPos
Returns
PostCommitCleanup(List<BlockUpdate>)
Used to fix certain things like flowing water from the edge of a pasted schematic/selection when undone or /we delete is used
void PostCommitCleanup(List<BlockUpdate> updatedBlocks)
Parameters
updatedBlocks
List<BlockUpdate>
SetChunks(Vec2i, IWorldChunk[])
Implemented only by BlockAccessorMapChunkLoading
void SetChunks(Vec2i chunkCoord, IWorldChunk[] chunksCol)
Parameters
chunkCoord
Vec2ichunksCol
IWorldChunk[]
SetDecorsBulk(long, Dictionary<int, Block>)
void SetDecorsBulk(long chunkIndex, Dictionary<int, Block> newDecors)
Parameters
chunkIndex
longnewDecors
Dictionary<int, Block>
Events
BeforeCommit
event Action<IBulkBlockAccessor> BeforeCommit