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 MCAPI Biome(::BiomeIdType id, ::std::string_view name);
78
79 MCAPI float getTemperature(::BlockSource const& region, ::BlockPos const& pos) const;
80 // NOLINTEND
81
82public:
83 // static functions
84 // NOLINTBEGIN
85 MCAPI static void buildCachedTemperatureNoise(::LevelChunk& chunk);
86
87#ifdef LL_PLAT_C
88 MCAPI static ::mce::Color getColorBySamplingSurroundings(
89 ::BlockSource& region,
90 ::BlockPos const& pos,
91 ::std::vector<::BlockPos> const& pattern,
92 ::gsl::not_null<int (*)(::Biome const&, ::BlockPos const&)> const& sampler
93 );
94#endif
95 // NOLINTEND
96
97public:
98 // static variables
99 // NOLINTBEGIN
100#ifdef LL_PLAT_C
101 MCAPI static ::mce::Color const& BIRCH_FOLIAGE_TINT();
102
103 MCAPI static ::mce::Color const& DEFAULT_FOLIAGE_TINT();
104
105 MCAPI static ::mce::Color const& DEFAULT_GRASS_TINT();
106
107 MCAPI static ::mce::Color const& DEFAULT_WATER_COLOR();
108
109 MCAPI static ::mce::Color const& DEFAULT_WATER_TINT();
110
111 MCAPI static ::mce::Color const& DRY_FOLIAGE_TINT();
112
113 MCAPI static ::mce::Color const& EVERGREEN_FOLIAGE_TINT();
114#endif
115 // NOLINTEND
116
117public:
118 // constructor thunks
119 // NOLINTBEGIN
120 MCAPI void* $ctor(::BiomeIdType id, ::std::string_view name);
121 // NOLINTEND
122};
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition IEnvironmentAttribute.h:7
Definition LevelChunk.h:77
Definition MobSpawnerData.h:17
Definition Color.h:13
Definition BiomeIdType.h:8
Definition SpawnerData.h:12