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
IWorldAccessorpos
BlockPoshandled
EnumHandling
Returns
GetCollisionBoxes(IBlockAccessor, BlockPos, ref EnumHandling)
public virtual Cuboidf[] GetCollisionBoxes(IBlockAccessor blockAccessor, BlockPos pos, ref EnumHandling handled)
Parameters
blockAccessor
IBlockAccessorpos
BlockPoshandled
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
IWorldAccessorpos
BlockPosdecalTexSource
ITexPositionSourcedecalModelData
MeshDatablockModelData
MeshDatahandled
EnumHandling
GetParticleBreakBox(IBlockAccessor, BlockPos, BlockFacing, ref EnumHandling)
public virtual Cuboidf GetParticleBreakBox(IBlockAccessor blockAccess, BlockPos pos, BlockFacing facing, ref EnumHandling handled)
Parameters
blockAccess
IBlockAccessorpos
BlockPosfacing
BlockFacinghandled
EnumHandling
Returns
GetParticleCollisionBoxes(IBlockAccessor, BlockPos, ref EnumHandling)
public virtual Cuboidf[] GetParticleCollisionBoxes(IBlockAccessor blockAccessor, BlockPos pos, ref EnumHandling handled)
Parameters
blockAccessor
IBlockAccessorpos
BlockPoshandled
EnumHandling
Returns
- Cuboidf[]
GetSelectionBoxes(IBlockAccessor, BlockPos, ref EnumHandling)
public virtual Cuboidf[] GetSelectionBoxes(IBlockAccessor blockAccessor, BlockPos pos, ref EnumHandling handled)
Parameters
blockAccessor
IBlockAccessorpos
BlockPoshandled
EnumHandling
Returns
- Cuboidf[]
OnDecalTesselation(IWorldAccessor, MeshData, BlockPos, ref EnumHandling)
public virtual void OnDecalTesselation(IWorldAccessor world, MeshData decalMesh, BlockPos pos, ref EnumHandling handled)
Parameters
world
IWorldAccessordecalMesh
MeshDatapos
BlockPoshandled
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
IBlockAccessorpos
BlockPosonBlockFace
BlockFacingworldgenRandom
IRandomhandled
EnumHandling