Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
Biome.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/string/HashedString.h"
7#include "mc/util/WeightedRandomList.h"
8#include "mc/world/level/biome/BiomeIdType.h"
9#include "mc/world/level/biome/OceanRuinConfiguration.h"
10#include "mc/world/level/biome/components/BiomeComponentStorage.h"
11
12// auto generated forward declare list
13// clang-format off
14class BlockPos;
15class BlockSource;
16class LevelChunk;
17class MobSpawnerData;
18namespace EAS { class IEnvironmentAttribute; }
19namespace br::worldgen { struct SpawnerData; }
20namespace mce { class Color; }
21// clang-format on
22
23class Biome {
24public:
25 // Biome inner types define
26 enum class BiomeTempCategory : int {
27 Ocean = 0,
28 Cold = 1,
29 Medium = 2,
30 Warm = 3,
31 };
32
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<4, 4, float> mTemperature;
37 ::ll::TypedStorage<4, 4, float> mDownfall;
38 ::ll::TypedStorage<4, 4, float> mRedSporeDensity;
39 ::ll::TypedStorage<4, 4, float> mBlueSporeDensity;
40 ::ll::TypedStorage<4, 4, float> mAshDensity;
41 ::ll::TypedStorage<4, 4, float> mWhiteAshDensity;
42 ::ll::TypedStorage<4, 4, float> mSnowAccumulation;
43 ::ll::TypedStorage<4, 4, float> mFoliageSnow;
44 ::ll::TypedStorage<4, 4, float> mMinSnowLevel;
45 ::ll::TypedStorage<4, 4, float> mMaxSnowLevel;
46 ::ll::TypedStorage<4, 4, float> mDepth;
47 ::ll::TypedStorage<4, 4, float> mScale;
48 ::ll::TypedStorage<4, 4, int> mMapWaterColor;
49 ::ll::TypedStorage<4, 4, float const> mMapWaterTransparency;
50 ::ll::TypedStorage<1, 1, bool> mRain;
51 ::ll::TypedStorage<4, 12, ::OceanRuinConfiguration> mOceanRuinConfig;
52 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::MobSpawnerData>>> mMobs;
53 ::ll::TypedStorage<8, 256, ::std::array<::WeightedRandomList<::br::worldgen::SpawnerData>, 8>> mMobsMap;
54 ::ll::TypedStorage<2, 2, ::BiomeIdType const> mId;
55 ::ll::TypedStorage<8, 32, ::BiomeComponentStorage> mBiomeComponentStorage;
56 ::ll::TypedStorage<8, 48, ::HashedString const> mHash;
57 ::ll::TypedStorage<
58 8,
59 16,
60 ::std::map<::std::string, ::std::unique_ptr<::EAS::IEnvironmentAttribute>, ::std::less<void>>>
61 mEnvironmentAttributes;
62 // NOLINTEND
63
64public:
65 // prevent constructor by default
66 Biome();
67
68public:
69 // virtual functions
70 // NOLINTBEGIN
71 virtual ~Biome() = default;
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
77 MCNAPI Biome(::BiomeIdType id, ::std::string_view name);
78
79#ifdef LL_PLAT_S
80 MCNAPI int getMapFoliageColor() const;
81
82 MCNAPI int getMapGrassColor(::BlockPos const& pos) const;
83#endif
84
85 MCAPI float getTemperature(::BlockSource const& region, ::BlockPos const& pos) const;
86 // NOLINTEND
87
88public:
89 // static functions
90 // NOLINTBEGIN
91 MCNAPI static void buildCachedTemperatureNoise(::LevelChunk& chunk);
92
93 MCNAPI static ::mce::Color getColorBySamplingSurroundings(
94 ::BlockSource& region,
95 ::BlockPos const& pos,
96 ::std::vector<::BlockPos> const& pattern,
97 ::gsl::not_null<int (*)(::Biome const&, ::BlockPos const&)> const& sampler
98 );
99 // NOLINTEND
100
101public:
102 // static variables
103 // NOLINTBEGIN
104#ifdef LL_PLAT_C
105 MCNAPI static ::mce::Color const& BIRCH_FOLIAGE_TINT();
106
107 MCNAPI static ::mce::Color const& DEFAULT_FOLIAGE_TINT();
108
109 MCAPI static ::mce::Color const& DEFAULT_GRASS_TINT();
110
111 MCNAPI static ::mce::Color const& DEFAULT_WATER_COLOR();
112
113 MCNAPI static ::mce::Color const& DEFAULT_WATER_TINT();
114
115 MCNAPI static ::mce::Color const& DRY_FOLIAGE_TINT();
116
117 MCNAPI static ::mce::Color const& EVERGREEN_FOLIAGE_TINT();
118#endif
119 // NOLINTEND
120
121public:
122 // constructor thunks
123 // NOLINTBEGIN
124 MCNAPI void* $ctor(::BiomeIdType id, ::std::string_view name);
125 // NOLINTEND
126};
MCAPI void * $ctor(::BiomeIdType id, ::std::string_view name)
MCAPI Biome(::BiomeIdType id, ::std::string_view name)
static MCAPI void buildCachedTemperatureNoise(::LevelChunk &chunk)
static MCAPI ::mce::Color getColorBySamplingSurroundings(::BlockSource &region, ::BlockPos const &pos, ::std::vector<::BlockPos > const &pattern, ::gsl::not_null< int(*)(::Biome const &, ::BlockPos const &)> const &sampler)
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition IEnvironmentAttribute.h:7
Definition LevelChunk.h:76
Definition MobSpawnerData.h:17
Definition Color.h:13
Definition BiomeIdType.h:8
Definition SpawnerData.h:12