public void GenerateSubworldCave(Vec2i localEntrance)
    {
        DoubleBed b = new DoubleBed();

        b.SetPosition(localEntrance);
        AddObject(b, true);
        TrapDoor td = new TrapDoor();

        td.SetPosition(localEntrance);
        AddObject(td, true);
        Debug.Log("HERHEHRE");

        CaveDungeonBuilder cdb = new CaveDungeonBuilder(localEntrance + BaseTile, new Vec2i(4, 4));

        cdb.Generate(GenRan);
        Subworld cave = cdb.ToSubworld();

        AddSubworld(td, cave);
    }
    // Start is called before the first frame update
    void Start()
    {
        for (int i = 0; i < 0; i++)
        {
            Debug.Log("TETSTETSTHSIBFM<DB NVGA>");
        }

        int             seed = 0;
        SubworldBuilder setB = new CaveDungeonBuilder(new Vec2i(2, 2), new Vec2i(8, 8));

        setB.Generate(new GenerationRandom(seed));



        List <ChunkData> chunks = setB.ToChunkData();

        Chunks = new ChunkData[20, 20];
        foreach (ChunkData c in chunks)
        {
            Chunks[c.X, c.Z] = c;
        }
        foreach (ChunkData cd in Chunks)
        {
            if (cd == null)
            {
                continue;
            }
            PreLoadedChunk plc = GeneratePreLoadedChunk(cd);

            CreateChunk(plc, cd);
        }

        Player player = new Player();

        PlayerManager.Instance.SetPlayer(player);

        HeadLight.transform.parent = player.GetLoadedEntity().transform;
    }