Skip to content
LeviMC
English
AutoLightDark
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;
16// clang-format on
17
18class LevelChunkBiomes {
19public:
20 // LevelChunkBiomes inner types declare
21 // clang-format off
22 struct MemoryEstimateData;
23 // clang-format on
24
25 // LevelChunkBiomes inner types define
27 public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 8, uint64> mBiomeData3DSize;
31 ::ll::TypedStorage<8, 8, uint64> mMinBiomePaletteSize;
32 ::ll::TypedStorage<8, 8, double> mAverageBiomePaletteSize;
33 ::ll::TypedStorage<8, 8, uint64> mMaxBiomePaletteSize;
34 // NOLINTEND
35 };
36
37public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<2, 512, ::std::array<::BiomeIdType, 256>> m2DBiomes;
41 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>>> mBiomeSubchunks;
42 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mBiomesMutex;
43 ::ll::TypedStorage<2, 2, ushort> m3dBiomeStackSize;
44 // NOLINTEND
45
46#ifdef LL_PLAT_S
47#else // LL_PLAT_C
48public:
49 // prevent constructor by default
50 LevelChunkBiomes& operator=(LevelChunkBiomes const&);
51 LevelChunkBiomes(LevelChunkBiomes const&);
52 LevelChunkBiomes();
53
54#endif
55public:
56 // member functions
57 // NOLINTBEGIN
58 MCNAPI void fetchBiomes(::Bedrock::small_vector_base<::gsl::not_null<::Biome const*>>& output) const;
59
60 MCNAPI void makeUniformBiomes(::Biome const& biome);
61
62#ifdef LL_PLAT_C
63 MCNAPI ::LevelChunkBiomes& operator=(::LevelChunkBiomes&& otherChunkBiomes);
64#endif
65
66 MCNAPI void pruneBiomesSubChunk3D(ushort subChunkIndex, ::SubChunkStorageUnit::PruneType pruneType);
67
69 ushort numSubChunksToCreate,
70 ushort dimensionSubchunkHeight,
72 );
73
74 MCAPI void setBiomeFromVolume(::ChunkVolume::VolumeOf<::Biome> const& volume, ushort dimensionNumSubChunks);
75
77 ::Biome const& biome,
78 ushort subChunkIndex,
79 ushort storageIndex,
80 ushort dimensionSubchunkHeight,
82 bool allowRebuildingAdditionalSubChunk
83 );
84
85 MCNAPI void
86 setBiomeStorages(::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>> biomes, ushort biomeStackSize);
87
88 MCNAPI void setBiomeSubChunk3D(
89 ::Biome const& biome,
90 ushort subChunkIndex,
91 ushort dimensionSubchunkHeight,
92 bool allowRebuildingAdditionalSubChunk
93 );
94
95#ifdef LL_PLAT_C
96 MCNAPI void setBiomes(::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>> biomes, ushort biomeStackSize);
97#endif
98 // NOLINTEND
99};
Definition UniqueLock.h:8
Definition small_vector_base.h:10
Definition Biome.h:23
Definition VolumeOf.h:10
MCAPI void makeUniformBiomes(::Biome const &biome)
MCAPI void rebuildMissingBiomeSubChunks(ushort numSubChunksToCreate, ushort dimensionSubchunkHeight, ::Bedrock::Threading::UniqueLock<::std::shared_mutex > const &lock)
MCAPI void setBiomeSubChunk3D(::Biome const &biome, ushort subChunkIndex, ushort dimensionSubchunkHeight, bool allowRebuildingAdditionalSubChunk)
MCAPI void setBiomeStorages(::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome > > > biomes, ushort biomeStackSize)
MCAPI void fetchBiomes(::Bedrock::small_vector_base<::gsl::not_null<::Biome const * > > &output) const
MCAPI void setBiomeInSubChunk3D(::Biome const &biome, ushort subChunkIndex, ushort storageIndex, ushort dimensionSubchunkHeight, ::Bedrock::Threading::UniqueLock<::std::shared_mutex > const &writeLock, bool allowRebuildingAdditionalSubChunk)
MCAPI void pruneBiomesSubChunk3D(ushort subChunkIndex, ::SubChunkStorageUnit::PruneType pruneType)
Definition SubChunkStorage.h:30
Definition LevelChunkBiomes.h:26