Example #1
0
        public static MyCubeBlockDefinition GetCubeBlockDefinition(IMyCubeBlock block)
        {
            MyCubeBlockDefinition result;
            SerializableDefinitionId ID = block.BlockDefinition;

            if (!KnownDefinitions_CubeBlock.TryGetValue(ID, out result))
            {
                result = MyDefinitionManager.Static.GetCubeBlockDefinition(block.GetObjectBuilder_Safe());
                KnownDefinitions_CubeBlock.Add(ID, result);
            }

            return result;
        }