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

‪A group of blocks that can be selected together. The placed version of blueprints. Dispose after usage. More...

Inheritance diagram for TechbloxModdingAPI.BlockGroup:
TechbloxModdingAPI.EcsObjectBase

Public Member Functions

void Clear ()
 ‪Removes all blocks from this group. You cannot remove blocks that have been initialized, only those that you placed recently. More...
 
bool Contains (Block item)
 
void Dispose ()
 
IEnumerator< BlockGetEnumerator ()
 
override string ToString ()
 

Static Public Member Functions

static BlockGroup Create (Block block)
 ‪Creates a new block group consisting of a single block. You can add more blocks using the Add() method or by setting the BlockGroup property of the blocks.
Note that only newly placed blocks can be added to groups. More...
 

Public Attributes

Block this[int index] => blocks[index]
 

Package Functions

 BlockGroup (int id, Block block)
 
void AddInternal (Block item)
 
void RemoveInternal (Block item)
 

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)
 
static void Init ()
 

Package Attributes

EcsInitData InitData
 
bool PosAndRotCalculated
 

Static Package Attributes

static BlueprintEngine _engine = new BlueprintEngine()
 

Properties

EGID Id [get]
 
float3 Position [get, set]
 ‪The position of the block group (center). Can only be used after initialization is complete. More...
 
float3 Rotation [get, set]
 ‪The rotation of the block group. Can only be used after initialization is complete. More...
 

Detailed Description

A group of blocks that can be selected together. The placed version of blueprints. Dispose after usage.

Constructor & Destructor Documentation

◆ BlockGroup()

TechbloxModdingAPI.BlockGroup.BlockGroup ( int  id,
Block  block 
)
inlinepackage

Member Function Documentation

◆ AddInternal()

void TechbloxModdingAPI.BlockGroup.AddInternal ( Block  item)
inlinepackage

◆ Clear()

void TechbloxModdingAPI.BlockGroup.Clear ( )
inline

‪Removes all blocks from this group. You cannot remove blocks that have been initialized, only those that you placed recently.

◆ Contains()

bool TechbloxModdingAPI.BlockGroup.Contains ( Block  item)
inline

◆ Create()

static BlockGroup TechbloxModdingAPI.BlockGroup.Create ( Block  block)
inlinestatic

‪Creates a new block group consisting of a single block. You can add more blocks using the Add() method or by setting the BlockGroup property of the blocks.
Note that only newly placed blocks can be added to groups.

Parameters
block‪The block to add
Returns
‪A new block group containing the given block

◆ Dispose()

void TechbloxModdingAPI.BlockGroup.Dispose ( )
inline

◆ GetEnumerator()

IEnumerator<Block> TechbloxModdingAPI.BlockGroup.GetEnumerator ( )
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

◆ Init()

static void TechbloxModdingAPI.BlockGroup.Init ( )
inlinestaticpackage

◆ RemoveInternal()

void TechbloxModdingAPI.BlockGroup.RemoveInternal ( Block  item)
inlinepackage

◆ ToString()

override string TechbloxModdingAPI.BlockGroup.ToString ( )
inline

Member Data Documentation

◆ _engine

BlueprintEngine TechbloxModdingAPI.BlockGroup._engine = new BlueprintEngine()
staticpackage

◆ InitData

EcsInitData TechbloxModdingAPI.EcsObjectBase.InitData
packageinherited

◆ PosAndRotCalculated

bool TechbloxModdingAPI.BlockGroup.PosAndRotCalculated
package

◆ this[int index]

Block TechbloxModdingAPI.BlockGroup.this[int index] => blocks[index]

Property Documentation

◆ Id

EGID TechbloxModdingAPI.EcsObjectBase.Id
getinherited

◆ Position

float3 TechbloxModdingAPI.BlockGroup.Position
getset

‪The position of the block group (center). Can only be used after initialization is complete.

◆ Rotation

float3 TechbloxModdingAPI.BlockGroup.Rotation
getset

‪The rotation of the block group. Can only be used after initialization is complete.


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