LeviLamina
Loading...
Searching...
No Matches
ReplacementBiomeSource.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/brstd/flat_set.h"
7#include "mc/world/level/biome/source/BiomeSource.h"
8#include "mc/world/level/biome/source/BiomeSourceType.h"
9#include "mc/world/level/levelgen/synth/SimplexNoise.h"
10
11// auto generated forward declare list
12// clang-format off
13class Biome;
14class BiomeArea;
15class BiomeSource3d;
16class BlockPos;
17class BoundingBox;
19class LevelChunk;
21struct BiomeHashType;
22struct BiomeIdType;
23struct BiomeReplacement;
24struct GetBiomeOptions;
25// clang-format on
26
27class ReplacementBiomeSource : public ::BiomeSource {
28public:
29 // ReplacementBiomeSource inner types declare
30 // clang-format off
33 // clang-format on
34
35 // ReplacementBiomeSource inner types define
37 public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<8, 8, ::gsl::not_null<::Biome const*>> mBiome;
41 ::ll::TypedStorage<8, 16, ::std::optional<uint64>> mNoiseIndex;
42 // NOLINTEND
43 };
44
46 public:
47 // member variables
48 // NOLINTBEGIN
49 ::ll::TypedStorage<4, 2060, ::SimplexNoise const> mNoise;
50 ::ll::TypedStorage<4, 4, float> mAmount;
51 ::ll::TypedStorage<4, 4, float> mNoiseFrequencyScale;
52 // NOLINTEND
53 };
54
55public:
56 // member variables
57 // NOLINTBEGIN
58 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BiomeSource3d>> mWrappedBiomeSource;
59 ::ll::TypedStorage<
60 8,
61 64,
62 ::std::unordered_map<::BiomeIdType, ::std::vector<::ReplacementBiomeSource::BiomeReplacementIndex>>>
63 mVanillaBiomeToReplacementNoiseIndex;
64 ::ll::
65 TypedStorage<8, 40, ::brstd::flat_set<::BiomeIdType, ::std::less<::BiomeIdType>, ::std::vector<::BiomeIdType>>>
66 mFullyReplacedBiomeIds;
67 ::ll::TypedStorage<
68 8,
69 40,
71 mFullyReplacedBiomeNameHashes;
72 ::ll::TypedStorage<8, 24, ::std::vector<::ReplacementBiomeSource::BiomeReplacementNoise>> mNoiseEntries;
73 // NOLINTEND
74
75public:
76 // prevent constructor by default
77 ReplacementBiomeSource();
78
79public:
80 // virtual functions
81 // NOLINTBEGIN
82 virtual void fillBiomes(::LevelChunk& levelChunk, ::ChunkLocalNoiseCache const* chunkLocalNoiseCache) const
83 /*override*/;
84
85 virtual ::BiomeArea getBiomeArea(::BoundingBox const& area, uint scale) const /*override*/;
86
87 virtual ::BiomeArea
88 getBiomeArea(::BoundingBox const& area, uint scale, ::GetBiomeOptions const& getBiomeOptionsIn) const /*override*/;
89
90 virtual bool containsOnly(int xo, int yo, int zo, int r, ::gsl::span<::BiomeIdType const> allowed) const
91 /*override*/;
92
93 virtual bool hasBiomeById(::BiomeIdType id) const /*override*/;
94
95 virtual bool hasBiomeByNameHash(::BiomeHashType hash) const /*override*/;
96
97 virtual ::BiomeSourceType const getType() const /*override*/;
98
99 virtual ::Biome const* _getBiome(::GetBiomeOptions const& getBiomeOptions) const /*override*/;
100
101 virtual ~ReplacementBiomeSource() /*override*/;
102 // NOLINTEND
103
104public:
105 // member functions
106 // NOLINTBEGIN
107 MCAPI ReplacementBiomeSource(
108 ::XoroshiroPositionalRandomFactory const& random,
109 ::std::vector<::BiomeReplacement> const& biomeReplacements,
110 ::std::unique_ptr<::BiomeSource3d> wrappedBiomeSource
111 );
112
113 MCAPI bool fullyReplacesBiomeById(::BiomeIdType id) const;
114
115 MCAPI ::Biome const* tryReplace(::Biome const* targetBiome, ::BlockPos const& position) const;
116 // NOLINTEND
117
118public:
119 // constructor thunks
120 // NOLINTBEGIN
121 MCAPI void* $ctor(
122 ::XoroshiroPositionalRandomFactory const& random,
123 ::std::vector<::BiomeReplacement> const& biomeReplacements,
124 ::std::unique_ptr<::BiomeSource3d> wrappedBiomeSource
125 );
126 // NOLINTEND
127
128public:
129 // destructor thunk
130 // NOLINTBEGIN
131 MCAPI void $dtor();
132 // NOLINTEND
133
134public:
135 // virtual function thunks
136 // NOLINTBEGIN
137 MCAPI void $fillBiomes(::LevelChunk& levelChunk, ::ChunkLocalNoiseCache const* chunkLocalNoiseCache) const;
138
139 MCFOLD ::BiomeArea $getBiomeArea(::BoundingBox const& area, uint scale) const;
140
141 MCAPI ::BiomeArea
142 $getBiomeArea(::BoundingBox const& area, uint scale, ::GetBiomeOptions const& getBiomeOptionsIn) const;
143
144 MCAPI bool $containsOnly(int xo, int yo, int zo, int r, ::gsl::span<::BiomeIdType const> allowed) const;
145
146 MCAPI bool $hasBiomeById(::BiomeIdType id) const;
147
148 MCAPI bool $hasBiomeByNameHash(::BiomeHashType hash) const;
149
150 MCFOLD ::BiomeSourceType const $getType() const;
151
152 MCAPI ::Biome const* $_getBiome(::GetBiomeOptions const& getBiomeOptions) const;
153
154
155 // NOLINTEND
156
157public:
158 // vftables
159 // NOLINTBEGIN
160 MCNAPI static void** $vftable();
161 // NOLINTEND
162};
Definition BiomeArea.h:11
Definition BiomeSource3d.h:24
Definition BiomeSource.h:20
Definition Biome.h:23
Definition BlockPos.h:19
Definition BoundingBox.h:13
Definition ChunkLocalNoiseCache.h:8
Definition LevelChunk.h:79
static MCAPI void ** $vftable()
Definition XoroshiroPositionalRandomFactory.h:16
Definition flat_set.h:8
STL namespace.
Definition BiomeHashType.h:8
Definition BiomeIdType.h:8
Definition BiomeReplacement.h:10
Definition GetBiomeOptions.h:8
Definition ReplacementBiomeSource.h:36
Definition ReplacementBiomeSource.h:45