LeviLamina
Loading...
Searching...
No Matches
LevelChunkBiomes.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/container/small_vector_base.h"
7#include "mc/platform/threading/UniqueLock.h"
8#include "mc/world/level/biome/BiomeIdType.h"
9#include "mc/world/level/block/chunk_volume/VolumeOf.h"
10#include "mc/world/level/chunk/SubChunkStorage.h"
11#include "mc/world/level/chunk/sub_chunk_storage_unit/PruneType.h"
12
13// auto generated forward declare list
14// clang-format off
15class Biome;
16class BiomeRegistry;
17class ChunkBlockPos;
18// clang-format on
19
21public:
22 // LevelChunkBiomes inner types declare
23 // clang-format off
24 struct MemoryEstimateData;
25 // clang-format on
26
27 // LevelChunkBiomes inner types define
29 public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 8, uint64> mBiomeData3DSize;
33 ::ll::TypedStorage<8, 8, uint64> mMinBiomePaletteSize;
34 ::ll::TypedStorage<8, 8, double> mAverageBiomePaletteSize;
35 ::ll::TypedStorage<8, 8, uint64> mMaxBiomePaletteSize;
36 // NOLINTEND
37 };
38
39public:
40 // member variables
41 // NOLINTBEGIN
42 ::ll::TypedStorage<2, 512, ::std::array<::BiomeIdType, 256>> m2DBiomes;
43 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>>> mBiomeSubchunks;
44 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mBiomesMutex;
45 ::ll::TypedStorage<2, 2, ushort> m3dBiomeStackSize;
46 // NOLINTEND
47
48#ifdef LL_PLAT_S
49public:
50 // prevent constructor by default
51 LevelChunkBiomes& operator=(LevelChunkBiomes const&);
54
55#else // LL_PLAT_C
56#endif
57public:
58 // member functions
59 // NOLINTBEGIN
60 MCAPI void fetchBiomes(::Bedrock::small_vector_base<::gsl::not_null<::Biome const*>>& output) const;
61
62 MCAPI void makeUniformBiomes(::Biome const& biome);
63
64#ifdef LL_PLAT_S
65 MCAPI ::LevelChunkBiomes& operator=(::LevelChunkBiomes&& otherChunkBiomes);
66#endif
67
68 MCAPI void pruneBiomesSubChunk3D(ushort subChunkIndex, ::SubChunkStorageUnit::PruneType pruneType);
69
70 MCAPI void rebuildMissingBiomeSubChunks(
71 ushort numSubChunksToCreate,
72 ushort dimensionSubchunkHeight,
74 );
75
76#ifdef LL_PLAT_S
77 MCAPI void set2DBiomesFrom3D(
78 ::Biome const& defaultBiome,
79 ::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>> const& biomeSubChunks
80 );
81
82 MCAPI void setAllBiomesFrom2D(
83 ::std::array<::BiomeIdType, 256>& legacyBiomes,
84 ::Biome const& defaultBiome,
85 ::BiomeRegistry const& biomeRegistry,
86 ushort dimensionNumSubChunks
87 );
88
89 MCAPI void
90 setBiome(::Biome const& biome, ::ChunkBlockPos const& pos, bool fillYDimension, ushort dimensionSubchunkHeight);
91#endif
92
93 MCAPI void setBiomeFromVolume(::ChunkVolume::VolumeOf<::Biome> const& volume, ushort dimensionNumSubChunks);
94
95 MCAPI void
96 setBiomeStorages(::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>> biomes, ushort biomeStackSize);
97
98 MCAPI void setBiomeSubChunk3D(
99 ::Biome const& biome,
100 ushort subChunkIndex,
101 ushort dimensionSubchunkHeight,
102 bool allowRebuildingAdditionalSubChunk
103 );
104
105 MCAPI void setBiomes(::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>> biomes, ushort biomeStackSize);
106 // NOLINTEND
107};
Definition UniqueLock.h:8
Definition small_vector_base.h:8
Definition BiomeRegistry.h:37
Definition Biome.h:23
Definition ChunkBlockPos.h:10
Definition VolumeOf.h:10
Definition LevelChunkBiomes.h:20
Definition SubChunkStorage.h:30
Definition LevelChunkBiomes.h:28