Click or drag to resize
IMyCubeBlock Methods

[This is preliminary documentation and is subject to change.]

The IMyCubeBlock type exposes the following members.

Methods
  NameDescription
Public methodAddToGamePruningStructure (Inherited from IMyEntity.)
Public methodAddUpgradeValue
Preferred way of registering a block for upgrades Adding directly to the dictionary can have unintended consequences when multiple mods are involved.
Public methodBeforeSave (Inherited from IMyEntity.)
Public methodCalcLocalMatrix
Public methodCalculateCurrentModel
Calculates model currently used by block depending on its build progress and other factors
Public methodClose (Inherited from IMyEntity.)
Public methodDebugDraw
Debug only method. Effects may wary through time.
Public methodDebugDrawInvalidTriangles (Inherited from IMyEntity.)
Public methodDelete (Inherited from IMyEntity.)
Public methodDoOverlapSphereTest (Inherited from IMyEntity.)
Public methodEnableColorMaskForSubparts (Inherited from IMyEntity.)
Public methodGetChildren (Inherited from IMyEntity.)
Public methodGetDiffuseColor (Inherited from IMyEntity.)
Public methodGetDistanceBetweenCameraAndBoundingSphere (Inherited from IMyEntity.)
Public methodGetDistanceBetweenCameraAndPosition (Inherited from IMyEntity.)
Public methodGetFriendlyName (Inherited from IMyEntity.)
Public methodGetIntersectionWithLineAndBoundingSphere (Inherited from IMyEntity.)
Public methodGetIntersectionWithSphere (Inherited from IMyEntity.)
Public methodGetLargestDistanceBetweenCameraAndBoundingSphere (Inherited from IMyEntity.)
Public methodGetObjectBuilder (Inherited from IMyEntity.)
Public methodGetObjectBuilderCubeBlock
Returns block object builder which can be serialized or added to grid
Public methodGetOwnerFactionTag
Public methodGetPlayerRelationToOwner
Public methodGetPosition (Inherited from IMyEntity.)
Public methodGetSmallestDistanceBetweenCameraAndBoundingSphere (Inherited from IMyEntity.)
Public methodGetSubpart (Inherited from IMyEntity.)
Public methodGetTopMostParent (Inherited from IMyEntity.)
Public methodGetTrianglesIntersectingSphere (Inherited from IMyEntity.)
Public methodGetUserRelationToOwner
Public methodGetViewMatrix (Inherited from IMyEntity.)
Public methodGetWorldMatrixNormalizedInv (Inherited from IMyEntity.)
Public methodInit
Reloads block model and interactive objects (doors, terminals, etc...)
Public methodInit(MyObjectBuilder_CubeBlock, IMyCubeGrid)
Initializes block state from object builder
Public methodIsVisible (Inherited from IMyEntity.)
Public methodOnAddedToScene (Inherited from IMyEntity.)
Public methodOnBuildSuccess
Method called when a block has been built (after adding to the grid). This is called right after placing the block and it doesn't matter whether it is fully built (creative mode) or is only construction site. Note that it is not called for blocks which do not create FatBlock at that moment.
Public methodOnDestroy
Called when block is destroyed before being removed from grid
Public methodOnModelChange
Called when the model referred by the block is changed
Public methodOnRegisteredToGridSystems
Called at the end of registration from grid systems (after block has been registered).
Public methodOnRemovedByCubeBuilder
Method called when user removes a cube block from grid. Useful when block has to remove some other attached block (like motors).
Public methodOnRemovedFromScene (Inherited from IMyEntity.)
Public methodOnUnregisteredFromGridSystems
Called at the end of unregistration from grid systems (after block has been unregistered).
Public methodRaycastDetectors
Gets the name of interactive object intersected by defined line
Public methodReloadDetectors
Reloads detectors (interactive objects) in model
Public methodRemoveFromGamePruningStructure (Inherited from IMyEntity.)
Public methodSetColorMaskForSubparts (Inherited from IMyEntity.)
Public methodSetDamageEffect
Start or stop dammage effect on cube block
Public methodSetEmissiveParts
Sets the emissive value of a specific emissive material on entity.
(Inherited from IMyEntity.)
Public methodSetEmissivePartsForSubparts
Sets the emissive value of a specific emissive material on all entity subparts.
(Inherited from IMyEntity.)
Public methodSetLocalMatrix (Inherited from IMyEntity.)
Public methodSetPosition (Inherited from IMyEntity.)
Public methodSetWorldMatrix (Inherited from IMyEntity.)
Public methodTryGetSubpart (Inherited from IMyEntity.)
Public methodUpdateGamePruningStructure (Inherited from IMyEntity.)
Public methodUpdateIsWorking
Force refresh working state. Call if you change block state that could affect its working status.
Public methodUpdateVisual
Updates block visuals (ie. block emissivity)
Top
See Also