//For Chunk Selector
        public void SetSelectedChunk(Vector3 Position, Vector3 RayDirection)
        {
            CollisionResults Collision = ChunkSelectorQuad.CollideWith(Position, RayDirection);

            if (Collision == null)
            {
                return;
            }

            if (MasteryFile != null && Collision.GetClosest() != null)
            {
                float ChunkSize = MasteryFile.Settings.ChunkSize;
                SelectedChunkX = (int)Math.Floor(Collision.GetClosest().CollisionPoint.X / ChunkSize);
                SelectedChunkY = (int)Math.Floor(Collision.GetClosest().CollisionPoint.Y / ChunkSize);

                SelectedChunkX = SelectedChunkX >= 0 ? SelectedChunkX : 0;
                SelectedChunkY = SelectedChunkY >= 0 ? SelectedChunkY : 0;

                Vector3 ChunkPosition = new Vector3(SelectedChunkX * ChunkSize, SelectedChunkY * ChunkSize, 0);
                WorldFileGrid.SetPosition(Render.Graphics, ChunkPosition);
                ChunkSelectorQuad.SetPosition(ChunkPosition);

                //change CurrentWordFile
                CurrentWorldFile = null;
                if (MasteryFile.HasWorldFile(SelectedChunkX, SelectedChunkY))
                {
                    CurrentWorldFile = MasteryFile.GetWorldFile(SelectedChunkX, SelectedChunkY, 0);
                }
            }
        }
        //Updates data for
        public void MoveToChunk(int PX, int PY)
        {
            //if contains Worldfile

            SelectedChunkX = PX >= 0 ? PX : 0;
            SelectedChunkY = PY >= 0 ? PY : 0;

            float   ChunkSize     = MasteryFile.Settings.ChunkSize;
            Vector3 ChunkPosition = new Vector3(SelectedChunkX * ChunkSize, SelectedChunkY * ChunkSize, 0);

            WorldFileGrid.SetPosition(Render.Graphics, ChunkPosition);
            ChunkSelectorQuad.SetPosition(ChunkPosition);

            //change CurrentWordFile
            CurrentWorldFile = null;
            if (MasteryFile.HasWorldFile(SelectedChunkX, SelectedChunkY))
            {
                CurrentWorldFile = MasteryFile.GetWorldFile(SelectedChunkX, SelectedChunkY, 0);
            }
        }
        public void CreateMasteryFile()
        {
            /*
             * if (MasteryFile != null)
             * {
             * //MasteryFile.Close();
             *
             * }
             */

            if (MasteryFile != null)
            {
                return;
            }
            MasteryFile = new MasteryWorldFile();
            float ChunkSize   = MasteryFile.Settings.ChunkSize;
            float MinDistance = -ChunkSize * MasteryFile.Settings.ChunkSelectionRadius;
            float MaxDistance = ChunkSize * (MasteryFile.Settings.ChunkSelectionRadius + 1);

            ChunkSelectorQuad.SetVertices(new Vector3(MinDistance, MinDistance, 0), new Vector3(MaxDistance, MinDistance, 0), new Vector3(MinDistance, MaxDistance, 0), new Vector3(MaxDistance, MaxDistance, 0));
        }