‪GamecraftModdingAPI  ‪v1.8.0
‪The unofficial Gamecraft modding API
GamecraftModdingAPI.BlockGroup Class Reference

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

Inheritance diagram for GamecraftModdingAPI.BlockGroup:

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

Package Attributes

bool PosAndRotCalculated
 

Static Package Attributes

static BlueprintEngine _engine = new BlueprintEngine()
 

Properties

int 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()

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

Member Function Documentation

◆ AddInternal()

void GamecraftModdingAPI.BlockGroup.AddInternal ( Block  item)
inlinepackage

◆ Clear()

void GamecraftModdingAPI.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 GamecraftModdingAPI.BlockGroup.Contains ( Block  item)
inline

◆ Create()

static BlockGroup GamecraftModdingAPI.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 GamecraftModdingAPI.BlockGroup.Dispose ( )
inline

◆ GetEnumerator()

IEnumerator<Block> GamecraftModdingAPI.BlockGroup.GetEnumerator ( )
inline

◆ Init()

static void GamecraftModdingAPI.BlockGroup.Init ( )
inlinestaticpackage

◆ RemoveInternal()

void GamecraftModdingAPI.BlockGroup.RemoveInternal ( Block  item)
inlinepackage

◆ ToString()

override string GamecraftModdingAPI.BlockGroup.ToString ( )
inline

Member Data Documentation

◆ _engine

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

◆ PosAndRotCalculated

bool GamecraftModdingAPI.BlockGroup.PosAndRotCalculated
package

◆ this[int index]

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

Property Documentation

◆ Id

int GamecraftModdingAPI.BlockGroup.Id
get

◆ Position

float3 GamecraftModdingAPI.BlockGroup.Position
getset

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

◆ Rotation

float3 GamecraftModdingAPI.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: