Table of Contents

Class StrongBlockBehavior

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Same as block behavior but allows even more control over a block, such as the blocks collision boxes and world gen behavior. These are not part of default block behaviors for performance reasons. Requires the block to use the GenericBlock block class (or inherit from it)

public abstract class StrongBlockBehavior : BlockBehavior
Inheritance
StrongBlockBehavior
Inherited Members
Extension Methods

Constructors

StrongBlockBehavior(Block)

protected StrongBlockBehavior(Block block)

Parameters

block Block

Methods

DoParticalSelection(IWorldAccessor, BlockPos, ref EnumHandling)

public virtual bool DoParticalSelection(IWorldAccessor world, BlockPos pos, ref EnumHandling handled)

Parameters

world IWorldAccessor
pos BlockPos
handled EnumHandling

Returns

bool

GetCollisionBoxes(IBlockAccessor, BlockPos, ref EnumHandling)

public virtual Cuboidf[] GetCollisionBoxes(IBlockAccessor blockAccessor, BlockPos pos, ref EnumHandling handled)

Parameters

blockAccessor IBlockAccessor
pos BlockPos
handled EnumHandling

Returns

Cuboidf[]

GetDecal(IWorldAccessor, BlockPos, ITexPositionSource, ref MeshData, ref MeshData, ref EnumHandling)

public virtual void GetDecal(IWorldAccessor world, BlockPos pos, ITexPositionSource decalTexSource, ref MeshData decalModelData, ref MeshData blockModelData, ref EnumHandling handled)

Parameters

world IWorldAccessor
pos BlockPos
decalTexSource ITexPositionSource
decalModelData MeshData
blockModelData MeshData
handled EnumHandling

GetParticleBreakBox(IBlockAccessor, BlockPos, BlockFacing, ref EnumHandling)

public virtual Cuboidf GetParticleBreakBox(IBlockAccessor blockAccess, BlockPos pos, BlockFacing facing, ref EnumHandling handled)

Parameters

blockAccess IBlockAccessor
pos BlockPos
facing BlockFacing
handled EnumHandling

Returns

Cuboidf

GetParticleCollisionBoxes(IBlockAccessor, BlockPos, ref EnumHandling)

public virtual Cuboidf[] GetParticleCollisionBoxes(IBlockAccessor blockAccessor, BlockPos pos, ref EnumHandling handled)

Parameters

blockAccessor IBlockAccessor
pos BlockPos
handled EnumHandling

Returns

Cuboidf[]

GetSelectionBoxes(IBlockAccessor, BlockPos, ref EnumHandling)

public virtual Cuboidf[] GetSelectionBoxes(IBlockAccessor blockAccessor, BlockPos pos, ref EnumHandling handled)

Parameters

blockAccessor IBlockAccessor
pos BlockPos
handled EnumHandling

Returns

Cuboidf[]

OnDecalTesselation(IWorldAccessor, MeshData, BlockPos, ref EnumHandling)

public virtual void OnDecalTesselation(IWorldAccessor world, MeshData decalMesh, BlockPos pos, ref EnumHandling handled)

Parameters

world IWorldAccessor
decalMesh MeshData
pos BlockPos
handled EnumHandling

TryPlaceBlockForWorldGen(IBlockAccessor, BlockPos, BlockFacing, IRandom, ref EnumHandling)

public virtual bool TryPlaceBlockForWorldGen(IBlockAccessor blockAccessor, BlockPos pos, BlockFacing onBlockFace, IRandom worldgenRandom, ref EnumHandling handled)

Parameters

blockAccessor IBlockAccessor
pos BlockPos
onBlockFace BlockFacing
worldgenRandom IRandom
handled EnumHandling

Returns

bool