Class BlockGeneric
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
public class BlockGeneric : Block
- Inheritance
-
BlockGeneric
- Inherited Members
- Extension Methods
Methods
DoParticalSelection(IWorldAccessor, BlockPos)
If true, the player can select invdividual selection boxes of this block
public override bool DoParticalSelection(IWorldAccessor world, BlockPos pos)
Parameters
world
IWorldAccessorpos
BlockPos
Returns
GetCollisionBoxes(IBlockAccessor, BlockPos)
Returns the blocks collision box. Warning: This method may get called by different threads, so it has to be thread safe.
public override Cuboidf[] GetCollisionBoxes(IBlockAccessor blockAccessor, BlockPos pos)
Parameters
blockAccessor
IBlockAccessorpos
BlockPos
Returns
- Cuboidf[]
GetDecal(IWorldAccessor, BlockPos, ITexPositionSource, ref MeshData, ref MeshData)
Called before a decal is created.
public override void GetDecal(IWorldAccessor world, BlockPos pos, ITexPositionSource decalTexSource, ref MeshData decalModelData, ref MeshData blockModelData)
Parameters
world
IWorldAccessorpos
BlockPosdecalTexSource
ITexPositionSourcedecalModelData
MeshDataThe block model which need UV values for the decal texture
blockModelData
MeshDataThe original block model
GetParticleBreakBox(IBlockAccessor, BlockPos, BlockFacing)
The cuboid used to determine where to spawn particles when breaking the block
public override Cuboidf GetParticleBreakBox(IBlockAccessor blockAccess, BlockPos pos, BlockFacing facing)
Parameters
blockAccess
IBlockAccessorpos
BlockPosfacing
BlockFacing
Returns
GetParticleCollisionBoxes(IBlockAccessor, BlockPos)
Returns the blocks particle collision box. Warning: This method may get called by different threads, so it has to be thread safe.
public override Cuboidf[] GetParticleCollisionBoxes(IBlockAccessor blockAccessor, BlockPos pos)
Parameters
blockAccessor
IBlockAccessorpos
BlockPos
Returns
- Cuboidf[]
GetSelectionBoxes(IBlockAccessor, BlockPos)
Returns the blocks selection boxes at this position in the world.
public override Cuboidf[] GetSelectionBoxes(IBlockAccessor blockAccessor, BlockPos pos)
Parameters
blockAccessor
IBlockAccessorpos
BlockPos
Returns
- Cuboidf[]
OnDecalTesselation(IWorldAccessor, MeshData, BlockPos)
public override void OnDecalTesselation(IWorldAccessor world, MeshData decalMesh, BlockPos pos)
Parameters
world
IWorldAccessordecalMesh
MeshDatapos
BlockPos
TryPlaceBlockForWorldGen(IBlockAccessor, BlockPos, BlockFacing, IRandom, BlockPatchAttributes)
Currently used for wildvines and saguaro cactus
public override bool TryPlaceBlockForWorldGen(IBlockAccessor blockAccessor, BlockPos pos, BlockFacing onBlockFace, IRandom worldgenRandom, BlockPatchAttributes attributes = null)
Parameters
blockAccessor
IBlockAccessorpos
BlockPosonBlockFace
BlockFacingworldgenRandom
IRandomattributes
BlockPatchAttributes