‪GamecraftModdingAPI  ‪v1.8.0
‪The unofficial Gamecraft modding API
GamecraftModdingAPI.Blocks.CustomBlockAttribute Class Reference
Inheritance diagram for GamecraftModdingAPI.Blocks.CustomBlockAttribute:

Public Member Functions

 CustomBlockAttribute (string catalog, string assetPath, string nameKey, string spriteName="CTR_CommandBlock", string descKey="")
 ‪Custom block attribute necessary for configuration. More...
 

Properties

string AssetPath [get]
 ‪The asset path/address for the block's prefab. More...
 
string Catalog [get]
 ‪The location of the catalog.json file used to find assets for this block. More...
 
CubeCategory Category = CubeCategory.General [get, set]
 ‪The block's category, so it's treated as a pre-existing functional block. More...
 
BlockColor DefaultColor [get, set]
 ‪The default color of the block when placed. More...
 
string DescKey [get]
 ‪The translation key for the block's description. More...
 
InventoryCategory InventoryCategory = InventoryCategory.Shapes [get, set]
 ‪The block's inventory category. More...
 
float Mass = 1f [get, set]
 ‪The block's mass. More...
 
string Material = "Aluminium" [get, set]
 ‪The key of the material properties this block should use. More...
 
string NameKey [get]
 ‪The translation key for the block's name. More...
 
ScalingPermission ScalingPermission [get, set]
 ‪The scaling permission determining what scaling is allowed on this block. More...
 
int SortIndex [get, set]
 ‪The sort index in the inventory. More...
 
string SpriteName [get]
 ‪The name of the sprite used in the inventory. More...
 
CubeType Type = CubeType.Block [get, set]
 ‪The block's type - block, joint, light. More...
 
float Volume = 1f [get, set]
 ‪The volume of the block. More...
 

Constructor & Destructor Documentation

◆ CustomBlockAttribute()

GamecraftModdingAPI.Blocks.CustomBlockAttribute.CustomBlockAttribute ( string  catalog,
string  assetPath,
string  nameKey,
string  spriteName = "CTR_CommandBlock",
string  descKey = "" 
)
inline

‪Custom block attribute necessary for configuration.

Parameters
catalog‪File path to the catalog.json that holds asset references for the custom block
assetPath‪The path/address to the block's prefab specified in Unity
nameKey‪The translation key for the block's name
spriteName‪The path to the inventory sprite for the block, console block by default
descKey‪The translation key for the block's description

Property Documentation

◆ AssetPath

string GamecraftModdingAPI.Blocks.CustomBlockAttribute.AssetPath
get

‪The asset path/address for the block's prefab.

◆ Catalog

string GamecraftModdingAPI.Blocks.CustomBlockAttribute.Catalog
get

‪The location of the catalog.json file used to find assets for this block.

◆ Category

CubeCategory GamecraftModdingAPI.Blocks.CustomBlockAttribute.Category = CubeCategory.General
getset

‪The block's category, so it's treated as a pre-existing functional block.

◆ DefaultColor

BlockColor GamecraftModdingAPI.Blocks.CustomBlockAttribute.DefaultColor
getset

‪The default color of the block when placed.

◆ DescKey

string GamecraftModdingAPI.Blocks.CustomBlockAttribute.DescKey
get

‪The translation key for the block's description.

◆ InventoryCategory

InventoryCategory GamecraftModdingAPI.Blocks.CustomBlockAttribute.InventoryCategory = InventoryCategory.Shapes
getset

‪The block's inventory category.

◆ Mass

float GamecraftModdingAPI.Blocks.CustomBlockAttribute.Mass = 1f
getset

‪The block's mass.

◆ Material

string GamecraftModdingAPI.Blocks.CustomBlockAttribute.Material = "Aluminium"
getset

‪The key of the material properties this block should use.

◆ NameKey

string GamecraftModdingAPI.Blocks.CustomBlockAttribute.NameKey
get

‪The translation key for the block's name.

◆ ScalingPermission

ScalingPermission GamecraftModdingAPI.Blocks.CustomBlockAttribute.ScalingPermission
getset

‪The scaling permission determining what scaling is allowed on this block.

◆ SortIndex

int GamecraftModdingAPI.Blocks.CustomBlockAttribute.SortIndex
getset

‪The sort index in the inventory.

◆ SpriteName

string GamecraftModdingAPI.Blocks.CustomBlockAttribute.SpriteName
get

‪The name of the sprite used in the inventory.

◆ Type

CubeType GamecraftModdingAPI.Blocks.CustomBlockAttribute.Type = CubeType.Block
getset

‪The block's type - block, joint, light.

◆ Volume

float GamecraftModdingAPI.Blocks.CustomBlockAttribute.Volume = 1f
getset

‪The volume of the block.


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