Empeld
Empeld plugin documentation.
pluginbase.Objects.World.Blocks.IBlock Interface Reference

An interface representing a block More...

Inheritance diagram for pluginbase.Objects.World.Blocks.IBlock:
pluginbase.Objects.World.Blocks.BlockBase pluginbase.Objects.World.Blocks.IBlockInteractable essentials.BlockEntities.EntityPlaceholderBlock essentials.blocks.alien.AlienBlock essentials.Blocks.EssentialsBlock essentials.blocks.structural.StructuralBase essentials.blocks.vegetation.VegetationBase pluginbase.Objects.World.Blocks.Air pluginbase.Objects.World.Blocks.MissingBlock essentials.BlockEntities.EntityPlaceholderBlock essentials.blocks.structural.Doors.IDoor

Public Member Functions

Matrix4 GetDynamicMeshTransform (IWorldReadonly world, Vector3i pos)
 Gets the dynamic mesh transform. More...
 
void GetDynamicMeshClones (IWorldReadonly world, Vector3i pos, Action< Matrix4 > render)
 Gets the dynamic mesh clone matricies More...
 
Vector3 GetVertWavePower (Vector3 pt)
 For each vertex in the mesh/block, compute how affected it is by VertWave animation Only important if AnimationMode == VertWave More...
 
bool PhysicsSimulate (IWorld world, IWorldBlock block)
 Simulates the physics. More...
 
Get< T > ()
 Get this instance extension type More...
 
void Set< T > (T extension)
 Set the specified extension. More...
 

Properties

string Name [get]
 Display name More...
 
string InternalName [get]
 Name of the block internally (Usually defined by the attribute) More...
 
ushort Id [get]
 Id that represent the block type (usually hash of InternalName) More...
 
bool Renderable [get]
 Renderable, aka visible More...
 
BlockTextureMode TextureMode [get]
 Render mode for the block (mostly relates to texturing) More...
 
BlockRenderMode RenderMode [get]
 Defines how the faces of the block get rendered, and by what rules More...
 
BlockVertexMode VertexMode [get]
 Vertex mode of the rendered block More...
 
BlockAnimationMode AnimationMode [get]
 Gets the animation mode. More...
 
float Transparency [get]
 Amount of transparency More...
 
string TextureResource [get]
 Texture file that represents the image starting at the "content/textures/" root More...
 
int TextureStretch [get]
 Number of blocks the texture stretches (default 1). Needs rendermode stretch More...
 
BlockMeshTransform MeshTransformMode [get]
 Gets the mesh render mode More...
 
BlockMeshLodMode MeshLodMode [get]
 Gets the LOD mode for the mesh More...
 
bool MeshReverseNormals [get]
 If true, will reverse the ordering of the mesh vertices to change how normals are computed More...
 
int MeshLodDistance [get]
 Distance, in lod-levels, until the lod mode is applied More...
 
int MeshLodSkipMultiplier [get]
 Multiplying factor for how many tris to skip per lod level More...
 
string MeshResource [get]
 Gets the mesh resource. More...
 
Matrix4 MeshTransform [get]
 Gets the mesh transform matrix More...
 
Vector3 MeshOverrideNormal [get]
 If provided, overrides the normal of the mesh geometry with this normal More...
 
string IconResource [get]
 Resolved resource path to an icon representing the block More...
 
BlockIconMode IconMode [get]
 Gets the icon mode for how the resoruce is rendered More...
 
bool Destructable [get]
 Am I destructable More...
 
bool Solid [get]
 Is the block solid, that is, does it have collision More...
 
double FrictionRatio [get]
 The friction applied to walking on/through the block when slowing/stopping Normal is 1f More...
 
double FallDamageRatio [get]
 The amount of fall damage taken by falling on (normal is 1f) More...
 
double SpeedLimit [get]
 Speed limit going through the block. Normal is no limit More...
 
double SpeedMultiplier [get]
 Gets the speed multiplier. More...
 
int DamageInfliction [get]
 Amount of damage points inflicted by touching. A person is 100 damage Default 0 More...
 
double BounceRatio [get]
 When falling on this block, bounce this much. 1f is equal height as fallen Default 0 More...
 
bool Climbable [get]
 Can the block be climbed More...
 
bool Sloped [get]
 Should the block be considered to be sloped More...
 
bool IsLiquid [get]
 Gets a value indicating whether this instance is liquid. More...
 
float FluidDensity [get]
 Affects several aspects with fluids/gasses 1) Lighter density liquids will float to the top 2) Higher densities will retrict movement (i.e. sink into, or be solid) Default 0.0; More...
 
BlockPermeableMode FluidPermeableMode [get]
 Gets how this block reacts to fluids More...
 
Vector3d GravityMultiplier [get]
 Gets the gravity multiplier to affect existing gravity More...
 
Vector3d GravityConstant [get]
 Gets the gravity constant, to supply its own gravity More...
 
bool HasPhysics [get]
 Does the block have any physics (mostly for optimization) This is weather the block will actually fall/move, not whether physics is applied to entities More...
 
bool PhysicsAutoStart [get]
 Gets a value indicating whether this pluginbase.Objects.World.Blocks.IBlock physics auto starts, triggering on world-gen rather than interaction More...
 
TimeSpan PhysicsFrequency [get]
 Gets the physics delay, which is how often physics will be applied More...
 
bool HasFog [get]
 When viewport is inside block, do we alter fog (i.e. underwater) Default false More...
 
Rgba FogColor [get]
 Return a 4-tuple of fog color (RGBA) More...
 
float FogDensity [get]
 Density of the fog More...
 
bool EmitsLight [get]
 Does the block emit light More...
 
Rgba EmitColor [get]
 Emittance color More...
 
float EmitRadius [get]
 Gets the light radius of the light More...
 
bool EmitIsDirectional [get]
 Gets a value indicating whether this pluginbase.Objects.World.Blocks.IBlock emit is directional. More...
 
Vector3 EmitDirection [get]
 Gets the emit direction. More...
 
float EmitDirectionFocus [get]
 Gets the emit direction focus. More...
 
string ParticleSystemScript [get]
 Resolved path to a particle script More...
 
bool HasParticleSystem [get]
 Gets a value indicating whether this instance has particle system. More...
 
int ParticleSystemViewDistance [get]
 Gets the max distance we can view the particle system from More...
 
SoundDescriptor SoundAmbient [get]
 Ambient sound the block makes by existing More...
 
SoundDescriptor SoundWalk [get]
 Sound of walking on the block (or moving through, in case of water) More...
 
SoundDescriptor SoundFall [get]
 Sound for falling on block More...
 
SoundDescriptor SoundPlace [get]
 Sound when placing block More...
 
SoundDescriptor SoundBreak [get]
 Sound when breaking block More...
 
SoundDescriptor SoundInteract [get]
 Sound when interacting with block More...
 
float MaterialDensity [get]
 Gets the material density; aka its weight per cubic block More...
 
MaterialType MaterialType [get]
 Gets the type of the material. More...
 

Detailed Description

An interface representing a block

Member Function Documentation

◆ Get< T >()

T pluginbase.Objects.World.Blocks.IBlock.Get< T > ( )

Get this instance extension type

Template Parameters
TThe 1st type parameter.

Implemented in pluginbase.Objects.World.Blocks.BlockBase.

Type Constraints
T :class 

◆ GetDynamicMeshClones()

◆ GetDynamicMeshTransform()

◆ GetVertWavePower()

Vector3 pluginbase.Objects.World.Blocks.IBlock.GetVertWavePower ( Vector3  pt)

For each vertex in the mesh/block, compute how affected it is by VertWave animation Only important if AnimationMode == VertWave

Returns
The vert wave power.
Parameters
ptLocal vertex in block/mesh-space

Implemented in pluginbase.Objects.World.Blocks.BlockBase, essentials.blocks.vegetation.Trees.AbstractBranch, essentials.blocks.vegetation.Brush.GrassBase, essentials.blocks.vegetation.Trees.PalmTreeLeaves, essentials.blocks.vegetation.Underwater.UnderwaterBase, essentials.blocks.vegetation.Trees.AbstractLeaves, and essentials.blocks.vegetation.Brush.BrushAnimatedBase.

◆ PhysicsSimulate()

◆ Set< T >()

void pluginbase.Objects.World.Blocks.IBlock.Set< T > ( extension)

Set the specified extension.

Parameters
extensionExtension.
Template Parameters
TThe 1st type parameter.

Implemented in pluginbase.Objects.World.Blocks.BlockBase.

Type Constraints
T :class 

Property Documentation

◆ AnimationMode

BlockAnimationMode pluginbase.Objects.World.Blocks.IBlock.AnimationMode
get

Gets the animation mode.

The animation mode.

◆ BounceRatio

double pluginbase.Objects.World.Blocks.IBlock.BounceRatio
get

When falling on this block, bounce this much. 1f is equal height as fallen Default 0

◆ Climbable

bool pluginbase.Objects.World.Blocks.IBlock.Climbable
get

Can the block be climbed

◆ DamageInfliction

int pluginbase.Objects.World.Blocks.IBlock.DamageInfliction
get

Amount of damage points inflicted by touching. A person is 100 damage Default 0

◆ Destructable

bool pluginbase.Objects.World.Blocks.IBlock.Destructable
get

Am I destructable

◆ EmitColor

Rgba pluginbase.Objects.World.Blocks.IBlock.EmitColor
get

Emittance color

◆ EmitDirection

Vector3 pluginbase.Objects.World.Blocks.IBlock.EmitDirection
get

Gets the emit direction.

The emit direction.

◆ EmitDirectionFocus

float pluginbase.Objects.World.Blocks.IBlock.EmitDirectionFocus
get

Gets the emit direction focus.

The emit direction focus.

◆ EmitIsDirectional

bool pluginbase.Objects.World.Blocks.IBlock.EmitIsDirectional
get

Gets a value indicating whether this pluginbase.Objects.World.Blocks.IBlock emit is directional.

true if emit is directional; otherwise, false.

◆ EmitRadius

float pluginbase.Objects.World.Blocks.IBlock.EmitRadius
get

Gets the light radius of the light

The light radius.

◆ EmitsLight

bool pluginbase.Objects.World.Blocks.IBlock.EmitsLight
get

Does the block emit light

◆ FallDamageRatio

double pluginbase.Objects.World.Blocks.IBlock.FallDamageRatio
get

The amount of fall damage taken by falling on (normal is 1f)

◆ FluidDensity

float pluginbase.Objects.World.Blocks.IBlock.FluidDensity
get

Affects several aspects with fluids/gasses 1) Lighter density liquids will float to the top 2) Higher densities will retrict movement (i.e. sink into, or be solid) Default 0.0;

◆ FluidPermeableMode

BlockPermeableMode pluginbase.Objects.World.Blocks.IBlock.FluidPermeableMode
get

Gets how this block reacts to fluids

The fluid permeable.

◆ FogColor

Rgba pluginbase.Objects.World.Blocks.IBlock.FogColor
get

Return a 4-tuple of fog color (RGBA)

◆ FogDensity

float pluginbase.Objects.World.Blocks.IBlock.FogDensity
get

Density of the fog

◆ FrictionRatio

double pluginbase.Objects.World.Blocks.IBlock.FrictionRatio
get

The friction applied to walking on/through the block when slowing/stopping Normal is 1f

◆ GravityConstant

Vector3d pluginbase.Objects.World.Blocks.IBlock.GravityConstant
get

Gets the gravity constant, to supply its own gravity

The gravity constant.

◆ GravityMultiplier

Vector3d pluginbase.Objects.World.Blocks.IBlock.GravityMultiplier
get

Gets the gravity multiplier to affect existing gravity

The gravity multiplier.

◆ HasFog

bool pluginbase.Objects.World.Blocks.IBlock.HasFog
get

When viewport is inside block, do we alter fog (i.e. underwater) Default false

◆ HasParticleSystem

bool pluginbase.Objects.World.Blocks.IBlock.HasParticleSystem
get

Gets a value indicating whether this instance has particle system.

true if this instance has particle system; otherwise, false.

◆ HasPhysics

bool pluginbase.Objects.World.Blocks.IBlock.HasPhysics
get

Does the block have any physics (mostly for optimization) This is weather the block will actually fall/move, not whether physics is applied to entities

◆ IconMode

BlockIconMode pluginbase.Objects.World.Blocks.IBlock.IconMode
get

Gets the icon mode for how the resoruce is rendered

The icon mode.

◆ IconResource

string pluginbase.Objects.World.Blocks.IBlock.IconResource
get

Resolved resource path to an icon representing the block

The icon resource.

◆ Id

ushort pluginbase.Objects.World.Blocks.IBlock.Id
get

Id that represent the block type (usually hash of InternalName)

◆ InternalName

string pluginbase.Objects.World.Blocks.IBlock.InternalName
get

Name of the block internally (Usually defined by the attribute)

◆ IsLiquid

bool pluginbase.Objects.World.Blocks.IBlock.IsLiquid
get

Gets a value indicating whether this instance is liquid.

true if this instance is liquid; otherwise, false.

◆ MaterialDensity

float pluginbase.Objects.World.Blocks.IBlock.MaterialDensity
get

Gets the material density; aka its weight per cubic block

The material density.

◆ MaterialType

MaterialType pluginbase.Objects.World.Blocks.IBlock.MaterialType
get

Gets the type of the material.

The type of the material.

◆ MeshLodDistance

int pluginbase.Objects.World.Blocks.IBlock.MeshLodDistance
get

Distance, in lod-levels, until the lod mode is applied

The mesh lod distancer.

◆ MeshLodMode

BlockMeshLodMode pluginbase.Objects.World.Blocks.IBlock.MeshLodMode
get

Gets the LOD mode for the mesh

The mesh lod mode.

◆ MeshLodSkipMultiplier

int pluginbase.Objects.World.Blocks.IBlock.MeshLodSkipMultiplier
get

Multiplying factor for how many tris to skip per lod level

The mesh lod skip multiplier.

◆ MeshOverrideNormal

Vector3 pluginbase.Objects.World.Blocks.IBlock.MeshOverrideNormal
get

If provided, overrides the normal of the mesh geometry with this normal

The mesh override normal.

◆ MeshResource

string pluginbase.Objects.World.Blocks.IBlock.MeshResource
get

Gets the mesh resource.

The mesh resource.

◆ MeshReverseNormals

bool pluginbase.Objects.World.Blocks.IBlock.MeshReverseNormals
get

If true, will reverse the ordering of the mesh vertices to change how normals are computed

true if mesh reverse normals; otherwise, false.

◆ MeshTransform

Matrix4 pluginbase.Objects.World.Blocks.IBlock.MeshTransform
get

Gets the mesh transform matrix

The mesh transform.

◆ MeshTransformMode

BlockMeshTransform pluginbase.Objects.World.Blocks.IBlock.MeshTransformMode
get

Gets the mesh render mode

The mesh mode.

◆ Name

string pluginbase.Objects.World.Blocks.IBlock.Name
get

Display name

◆ ParticleSystemScript

string pluginbase.Objects.World.Blocks.IBlock.ParticleSystemScript
get

Resolved path to a particle script

The particle system script.

◆ ParticleSystemViewDistance

int pluginbase.Objects.World.Blocks.IBlock.ParticleSystemViewDistance
get

Gets the max distance we can view the particle system from

The particle system view distance.

◆ PhysicsAutoStart

bool pluginbase.Objects.World.Blocks.IBlock.PhysicsAutoStart
get

Gets a value indicating whether this pluginbase.Objects.World.Blocks.IBlock physics auto starts, triggering on world-gen rather than interaction

true if physics auto start; otherwise, false.

◆ PhysicsFrequency

TimeSpan pluginbase.Objects.World.Blocks.IBlock.PhysicsFrequency
get

Gets the physics delay, which is how often physics will be applied

The physics delay.

◆ Renderable

bool pluginbase.Objects.World.Blocks.IBlock.Renderable
get

Renderable, aka visible

◆ RenderMode

BlockRenderMode pluginbase.Objects.World.Blocks.IBlock.RenderMode
get

Defines how the faces of the block get rendered, and by what rules

The render mode.

◆ Sloped

bool pluginbase.Objects.World.Blocks.IBlock.Sloped
get

Should the block be considered to be sloped

true if sloped; otherwise, false.

◆ Solid

bool pluginbase.Objects.World.Blocks.IBlock.Solid
get

Is the block solid, that is, does it have collision

◆ SoundAmbient

SoundDescriptor pluginbase.Objects.World.Blocks.IBlock.SoundAmbient
get

Ambient sound the block makes by existing

◆ SoundBreak

SoundDescriptor pluginbase.Objects.World.Blocks.IBlock.SoundBreak
get

Sound when breaking block

◆ SoundFall

SoundDescriptor pluginbase.Objects.World.Blocks.IBlock.SoundFall
get

Sound for falling on block

◆ SoundInteract

SoundDescriptor pluginbase.Objects.World.Blocks.IBlock.SoundInteract
get

Sound when interacting with block

◆ SoundPlace

SoundDescriptor pluginbase.Objects.World.Blocks.IBlock.SoundPlace
get

Sound when placing block

◆ SoundWalk

SoundDescriptor pluginbase.Objects.World.Blocks.IBlock.SoundWalk
get

Sound of walking on the block (or moving through, in case of water)

◆ SpeedLimit

double pluginbase.Objects.World.Blocks.IBlock.SpeedLimit
get

Speed limit going through the block. Normal is no limit

◆ SpeedMultiplier

double pluginbase.Objects.World.Blocks.IBlock.SpeedMultiplier
get

Gets the speed multiplier.

The speed multiplier.

◆ TextureMode

BlockTextureMode pluginbase.Objects.World.Blocks.IBlock.TextureMode
get

Render mode for the block (mostly relates to texturing)

◆ TextureResource

string pluginbase.Objects.World.Blocks.IBlock.TextureResource
get

Texture file that represents the image starting at the "content/textures/" root

◆ TextureStretch

int pluginbase.Objects.World.Blocks.IBlock.TextureStretch
get

Number of blocks the texture stretches (default 1). Needs rendermode stretch

◆ Transparency

float pluginbase.Objects.World.Blocks.IBlock.Transparency
get

Amount of transparency

◆ VertexMode

BlockVertexMode pluginbase.Objects.World.Blocks.IBlock.VertexMode
get

Vertex mode of the rendered block

The vertex mode.


The documentation for this interface was generated from the following file: