‪TechbloxModdingAPI  ‪v2.2.0
‪The unofficial Techblox modding API
TechbloxModdingAPI.Cluster Class Reference

‪Represnts a cluster of blocks in time running mode, meaning blocks that are connected either directly or via joints. Only exists if a cluster destruction manager is present. Static blocks like grass and dirt aren't part of a cluster. More...

Inheritance diagram for TechbloxModdingAPI.Cluster:
TechbloxModdingAPI.EcsObjectBase

Public Member Functions

 Cluster (EGID id)
 
 Cluster (uint id)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
SimBody[] GetSimBodies ()
 ‪Returns the simulation-time rigid bodies for the chunks in this cluster. More...
 
override string ToString ()
 

Public Attributes

float Mass => Block.BlockEngine.GetBlockInfo<ClusterMassComponent>(this).mass
 ‪The mass of the cluster. More...
 

Protected Member Functions

bool Equals (Cluster other)
 

Static Package Functions

static T GetInstance< T > (EGID egid, Func< EGID, T > constructor, Type type=null)
 ‪Returns a cached instance if there's an actively used instance of the object already. Objects still get garbage collected and then they will be removed from the cache. More...
 
static WeakDictionary< EGID, EcsObjectBaseGetInstances (Type type)
 

Package Attributes

EcsInitData InitData
 

Properties

float CurrentHealth [get, set]
 
float HealthMultiplier [get, set]
 
EGID Id [get]
 
float InitialHealth [get, set]
 

Detailed Description

Represnts a cluster of blocks in time running mode, meaning blocks that are connected either directly or via joints. Only exists if a cluster destruction manager is present. Static blocks like grass and dirt aren't part of a cluster.

Constructor & Destructor Documentation

◆ Cluster() [1/2]

TechbloxModdingAPI.Cluster.Cluster ( EGID  id)
inline

◆ Cluster() [2/2]

TechbloxModdingAPI.Cluster.Cluster ( uint  id)
inline

Member Function Documentation

◆ Equals() [1/2]

bool TechbloxModdingAPI.Cluster.Equals ( Cluster  other)
inlineprotected

◆ Equals() [2/2]

override bool TechbloxModdingAPI.Cluster.Equals ( object  obj)
inline

◆ GetHashCode()

override int TechbloxModdingAPI.Cluster.GetHashCode ( )
inline

◆ GetInstance< T >()

static T TechbloxModdingAPI.EcsObjectBase.GetInstance< T > ( EGID  egid,
Func< EGID, T >  constructor,
Type  type = null 
)
inlinestaticpackageinherited

‪Returns a cached instance if there's an actively used instance of the object already. Objects still get garbage collected and then they will be removed from the cache.

Parameters
egid‪The EGID of the entity
constructor‪The constructor to construct the object
Template Parameters
T‪The object type
Returns
Type Constraints
T :EcsObjectBase 

◆ GetInstances()

static WeakDictionary<EGID, EcsObjectBase> TechbloxModdingAPI.EcsObjectBase.GetInstances ( Type  type)
inlinestaticpackageinherited

◆ GetSimBodies()

SimBody [] TechbloxModdingAPI.Cluster.GetSimBodies ( )
inline

‪Returns the simulation-time rigid bodies for the chunks in this cluster.

Returns
‪An array of sim-bodies

◆ ToString()

override string TechbloxModdingAPI.Cluster.ToString ( )
inline

Member Data Documentation

◆ InitData

EcsInitData TechbloxModdingAPI.EcsObjectBase.InitData
packageinherited

◆ Mass

float TechbloxModdingAPI.Cluster.Mass => Block.BlockEngine.GetBlockInfo<ClusterMassComponent>(this).mass

‪The mass of the cluster.

Property Documentation

◆ CurrentHealth

float TechbloxModdingAPI.Cluster.CurrentHealth
getset

◆ HealthMultiplier

float TechbloxModdingAPI.Cluster.HealthMultiplier
getset

◆ Id

EGID TechbloxModdingAPI.EcsObjectBase.Id
getinherited

◆ InitialHealth

float TechbloxModdingAPI.Cluster.InitialHealth
getset

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