Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRage.Game.ModAPI.Ingame.IMyCubeGrid

Malware edited this page Dec 21, 2018 · 44 revisions

Index

IMyCubeGrid Interface

Namespace: VRage.Game.ModAPI.Ingame
Assembly: VRage.Game.dll
Implements:

Summary

Grid interface

Properties

Member Description
string CustomName Display name of the grid (as seen in Info terminal tab)
float GridSize Grid size in meters
VRage.Game.MyCubeSize GridSizeEnum Grid size enum
bool IsStatic Determines if the grid is static (unmoveable)
VRageMath.Vector3I Max Maximum coordinates of blocks in grid
VRageMath.Vector3I Min Minimum coordinates of blocks in grid
VRage.Game.Components.MyEntityComponentContainer Components Inherited from IMyEntity
long EntityId Inherited from IMyEntity
string Name Inherited from IMyEntity
string DisplayName Inherited from IMyEntity
bool HasInventory Returns true if this entity has got at least one inventory. Note that one aggregate inventory can contain zero simple inventories => zero will be returned even if GetInventory() != null.

Inherited from IMyEntity
int InventoryCount Returns the count of the number of inventories this entity has.

Inherited from IMyEntity
VRageMath.BoundingBoxD WorldAABB Inherited from IMyEntity
VRageMath.BoundingBoxD WorldAABBHr Inherited from IMyEntity
VRageMath.MatrixD WorldMatrix Inherited from IMyEntity
VRageMath.BoundingSphereD WorldVolume Inherited from IMyEntity
VRageMath.BoundingSphereD WorldVolumeHr Inherited from IMyEntity

Methods

Member Description
bool CubeExists(VRageMath.Vector3I) Returns true if there is any block occupying given position
VRage.Game.ModAPI.Ingame.IMySlimBlock GetCubeBlock(VRageMath.Vector3I) Get cube block at given position
VRageMath.Vector3D GridIntegerToWorld(VRageMath.Vector3I) Converts grid coordinates to world space
VRageMath.Vector3I WorldToGridInteger(VRageMath.Vector3D) Converts world coordinates to grid space cell coordinates
bool IsSameConstructAs(VRage.Game.ModAPI.Ingame.IMyCubeGrid) Determines whether this grid is mechanically connected to the other. This is any grid connected with rotors or pistons or other mechanical devices, but not things like connectors. This will in most cases constitute your complete construct.
Be aware that using merge blocks combines grids into one, so this function will not filter out grids connected that way. Also be aware that detaching the heads of pistons and rotors will cause this connection to change.
VRage.Game.ModAPI.Ingame.IMyInventory GetInventory() Simply get the MyInventoryBase component stored in this entity.

Inherited from IMyEntity
VRage.Game.ModAPI.Ingame.IMyInventory GetInventory(int) Search for inventory component with maching index.

Inherited from IMyEntity
VRageMath.Vector3D GetPosition() Inherited from IMyEntity

Clone this wiki locally