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#include "mc/world/level/biome/components/vanilla/VanillaBiomeTypes.h"
12
13// auto generated forward declare list
14// clang-format off
15class BlockPos;
16class BlockSource;
17class LevelChunk;
18class MobSpawnerData;
19struct BiomeHeight;
20namespace br::worldgen { struct SpawnerData; }
21namespace mce { class Color; }
22// clang-format on
23
24class Biome {
25public:
26 // Biome inner types define
27 enum class BiomeTempCategory : int {
28 Ocean = 0,
29 Cold = 1,
30 Medium = 2,
31 Warm = 3,
32 };
33
34public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<4, 4, float> mTemperature;
38 ::ll::TypedStorage<4, 4, float> mDownfall;
39 ::ll::TypedStorage<4, 4, float> mRedSporeDensity;
40 ::ll::TypedStorage<4, 4, float> mBlueSporeDensity;
41 ::ll::TypedStorage<4, 4, float> mAshDensity;
42 ::ll::TypedStorage<4, 4, float> mWhiteAshDensity;
43 ::ll::TypedStorage<4, 4, float> mSnowAccumulation;
44 ::ll::TypedStorage<4, 4, float> mFoliageSnow;
45 ::ll::TypedStorage<4, 4, float> mMinSnowLevel;
46 ::ll::TypedStorage<4, 4, float> mMaxSnowLevel;
47 ::ll::TypedStorage<4, 4, float> mDepth;
48 ::ll::TypedStorage<4, 4, float> mScale;
49 ::ll::TypedStorage<4, 4, int> mMapWaterColor;
50 ::ll::TypedStorage<4, 4, float const> mMapWaterTransparency;
51 ::ll::TypedStorage<1, 1, bool> mRain;
52 ::ll::TypedStorage<4, 12, ::OceanRuinConfiguration> mOceanRuinConfig;
53 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::MobSpawnerData>>> mMobs;
54 ::ll::TypedStorage<8, 256, ::std::array<::WeightedRandomList<::br::worldgen::SpawnerData>, 8>> mMobsMap;
55 ::ll::TypedStorage<2, 2, ::BiomeIdType const> mId;
56 ::ll::TypedStorage<8, 32, ::BiomeComponentStorage> mBiomeComponentStorage;
57 ::ll::TypedStorage<8, 48, ::HashedString const> mHash;
58 // NOLINTEND
59
60public:
61 // prevent constructor by default
62 Biome();
63
64public:
65 // virtual functions
66 // NOLINTBEGIN
67 virtual ~Biome();
68 // NOLINTEND
69
70public:
71 // member functions
72 // NOLINTBEGIN
73 MCAPI Biome(::BiomeIdType id, ::std::string_view name);
74
75 MCAPI bool canHaveSnowfall(::BlockSource const& region, ::BlockPos const& pos) const;
76
77 MCAPI ::VanillaBiomeTypes getBiomeType() const;
78
79 MCFOLD float getDefaultBiomeTemperature() const;
80
81 MCFOLD float getDownfall() const;
82
83 MCAPI int getMapGrassColor(::BlockPos const& pos) const;
84
85 MCFOLD ::std::array<::WeightedRandomList<::br::worldgen::SpawnerData>, 8>& getMobMapMutable();
86
87 MCFOLD ::std::vector<::std::shared_ptr<::MobSpawnerData>> const& getMobs() const;
88
89 MCFOLD ::std::vector<::std::shared_ptr<::MobSpawnerData>>& getMobsMutable();
90
91 MCAPI int getSnowAccumulationLayers() const;
92
93 MCAPI float getTemperature(::BlockSource const& region, ::BlockPos const& pos) const;
94
95 MCAPI ::Biome::BiomeTempCategory getTemperatureCategory() const;
96
97 MCAPI float getTemperatureWorldGen(::BlockPos const& pos, short seaLevel) const;
98
99 MCAPI bool isHumid() const;
100
101 MCAPI bool isSnowCovered() const;
102
103 MCAPI ::Biome& setDepthAndScale(::BiomeHeight const& heightData);
104
105 MCAPI ::Biome& setMapWaterColor(int color);
106
107 MCAPI ::Biome& setNoRain();
108
109 MCAPI ::Biome& setOceanRuinConfig(::OceanRuinConfiguration const& config);
110
111 MCAPI ::Biome& setSnowAccumulation(float minSnowLevel, float maxSnowLevel);
112
113 MCAPI ::Biome& setTemperatureAndDownfall(float temperature, float downfall);
114 // NOLINTEND
115
116public:
117 // static functions
118 // NOLINTBEGIN
119 MCAPI static void buildCachedTemperatureNoise(::LevelChunk& chunk);
120
121 MCAPI static ::mce::Color getColorBySamplingSurroundings(
122 ::BlockSource& region,
123 ::BlockPos const& pos,
124 ::std::vector<::BlockPos> const& pattern,
125 ::gsl::not_null<int (*)(::Biome const&, ::BlockPos const&)> const& sampler
126 );
127 // NOLINTEND
128
129public:
130 // static variables
131 // NOLINTBEGIN
132 MCAPI static ::mce::Color const& BIRCH_FOLIAGE_TINT();
133
134 MCAPI static ::mce::Color const& DEFAULT_FOLIAGE_TINT();
135
136 MCAPI static ::mce::Color const& DEFAULT_GRASS_TINT();
137
138 MCAPI static ::mce::Color const& DEFAULT_UNDERWATER_COLOR();
139
140 MCAPI static ::mce::Color const& DEFAULT_WATER_COLOR();
141
142 MCAPI static ::mce::Color const& DEFAULT_WATER_TINT();
143
144 MCAPI static ::mce::Color const& DRY_FOLIAGE_TINT();
145
146 MCAPI static ::mce::Color const& EVERGREEN_FOLIAGE_TINT();
147
148 MCAPI static float const& RAIN_TEMP_THRESHOLD();
149 // NOLINTEND
150
151public:
152 // constructor thunks
153 // NOLINTBEGIN
154 MCAPI void* $ctor(::BiomeIdType id, ::std::string_view name);
155 // NOLINTEND
156
157public:
158 // destructor thunk
159 // NOLINTBEGIN
160 MCAPI void $dtor();
161 // NOLINTEND
162
163public:
164 // vftables
165 // NOLINTBEGIN
166 MCNAPI static void** $vftable();
167 // NOLINTEND
168};
static MCAPI void ** $vftable()
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition LevelChunk.h:87
Definition MobSpawnerData.h:17
Definition Color.h:13
Definition BiomeHeight.h:5
Definition BiomeIdType.h:8
Definition OceanRuinConfiguration.h:8
Definition SpawnerData.h:13