LeviLamina
Loading...
Searching...
No Matches
WorldBlockTarget.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/BlockDataFetchResult.h"
7#include "mc/world/level/IBlockWorldGenAPI.h"
8#include "mc/world/level/WorldGenContext.h"
9
10// auto generated forward declare list
11// clang-format off
12class Biome;
13class Block;
14class BlockPos;
15class BlockSource;
16class BoundingBox;
17class ChunkPos;
18class Feature;
19class LevelChunk;
20class LevelData;
21class Pos;
22class Random;
25// clang-format on
26
27class WorldBlockTarget : public ::IBlockWorldGenAPI {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 8, ::BlockSource&> mBlockSource;
32 ::ll::TypedStorage<8, 80, ::WorldGenContext> mWorldGenContext;
33 ::ll::TypedStorage<1, 1, bool> mBlockSimpleIsAllowed;
34 // NOLINTEND
35
36public:
37 // prevent constructor by default
38 WorldBlockTarget& operator=(WorldBlockTarget const&);
39 WorldBlockTarget(WorldBlockTarget const&);
40 WorldBlockTarget();
41
42public:
43 // virtual functions
44 // NOLINTBEGIN
45 virtual ~WorldBlockTarget() /*override*/ = default;
46
47 virtual bool canGetChunk() const /*override*/;
48
49 virtual ::LevelChunk* getChunk(::ChunkPos const& pos) /*override*/;
50
51 virtual ::Block const& getBlock(::BlockPos const& pos) const /*override*/;
52
53 virtual ::Block const& getBlockNoBoundsCheck(::BlockPos const& pos) const /*override*/;
54
55 virtual ::Block const& getExtraBlock(::BlockPos const& pos) const /*override*/;
56
57 virtual ::Block const* tryGetLiquidBlock(::BlockPos const& pos) const /*override*/;
58
59 virtual ::gsl::span<::BlockDataFetchResult<::Block> const>
60 fetchBlocksInBox(::BoundingBox const& box, ::std::function<bool(::Block const&)> predicate) /*override*/;
61
62 virtual bool hasBiomeTag(uint64 tagNameHash, ::BlockPos const& pos) const /*override*/;
63
64 virtual bool setBlock(::BlockPos const& pos, ::Block const& newBlock, int updateFlags) /*override*/;
65
66 virtual bool setBlockSimple(::BlockPos const& pos, ::Block const& block) /*override*/;
67
68 virtual bool apply() const /*override*/;
69
70 virtual bool
71 placeStructure(::BlockPos const& pos, ::StructureTemplate& structure, ::StructureSettings& settings) /*override*/;
72
73 virtual bool mayPlace(::BlockPos const& pos, ::Block const& block) const /*override*/;
74
75 virtual bool canSurvive(::BlockPos const& pos, ::Block const& block) const /*override*/;
76
77 virtual bool canBeBuiltOver(::BlockPos const& pos, ::Block const& block) const /*override*/;
78
79 virtual short getMaxHeight() const /*override*/;
80
81 virtual short getMinHeight() const /*override*/;
82
83 virtual bool shimPlaceForOldFeatures(::Feature const& feature, ::BlockPos const& pos, ::Random& random) const
84 /*override*/;
85
86 virtual short getHeightmap(int x, int z) /*override*/;
87
88 virtual bool isLegacyLevel() /*override*/;
89
90 virtual ::Biome const* getBiome(::BlockPos const& pos) const /*override*/;
91
92 virtual bool isInBounds(::Pos const& pos) const /*override*/;
93
94 virtual short getLocalWaterLevel(::BlockPos const&) const /*override*/;
95
96 virtual ::LevelData const& getLevelData() const /*override*/;
97
98 virtual ::WorldGenContext const& getContext() /*override*/;
99
100 virtual void disableBlockSimple() /*override*/;
101 // NOLINTEND
102
103public:
104 // member functions
105 // NOLINTBEGIN
106 MCAPI WorldBlockTarget(::BlockSource& region, ::WorldGenContext const& context);
107 // NOLINTEND
108
109public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCAPI void* $ctor(::BlockSource& region, ::WorldGenContext const& context);
113 // NOLINTEND
114
115public:
116 // virtual function thunks
117 // NOLINTBEGIN
118 MCFOLD bool $canGetChunk() const;
119
120 MCAPI ::LevelChunk* $getChunk(::ChunkPos const& pos);
121
122 MCAPI ::Block const& $getBlock(::BlockPos const& pos) const;
123
124 MCFOLD ::Block const& $getBlockNoBoundsCheck(::BlockPos const& pos) const;
125
126 MCAPI ::Block const& $getExtraBlock(::BlockPos const& pos) const;
127
128 MCAPI ::Block const* $tryGetLiquidBlock(::BlockPos const& pos) const;
129
130 MCAPI ::gsl::span<::BlockDataFetchResult<::Block> const>
131 $fetchBlocksInBox(::BoundingBox const& box, ::std::function<bool(::Block const&)> predicate);
132
133 MCAPI bool $hasBiomeTag(uint64 tagNameHash, ::BlockPos const& pos) const;
134
135 MCAPI bool $setBlock(::BlockPos const& pos, ::Block const& newBlock, int updateFlags);
136
137 MCAPI bool $setBlockSimple(::BlockPos const& pos, ::Block const& block);
138
139 MCFOLD bool $apply() const;
140
141 MCAPI bool $placeStructure(::BlockPos const& pos, ::StructureTemplate& structure, ::StructureSettings& settings);
142
143 MCAPI bool $mayPlace(::BlockPos const& pos, ::Block const& block) const;
144
145 MCAPI bool $canSurvive(::BlockPos const& pos, ::Block const& block) const;
146
147 MCAPI bool $canBeBuiltOver(::BlockPos const& pos, ::Block const& block) const;
148
149 MCAPI short $getMaxHeight() const;
150
151 MCAPI short $getMinHeight() const;
152
153 MCAPI bool $shimPlaceForOldFeatures(::Feature const& feature, ::BlockPos const& pos, ::Random& random) const;
154
155 MCAPI short $getHeightmap(int x, int z);
156
157 MCAPI bool $isLegacyLevel();
158
159 MCAPI ::Biome const* $getBiome(::BlockPos const& pos) const;
160
161 MCAPI bool $isInBounds(::Pos const& pos) const;
162
163 MCAPI short $getLocalWaterLevel(::BlockPos const&) const;
164
165 MCAPI ::LevelData const& $getLevelData() const;
166
167 MCFOLD ::WorldGenContext const& $getContext();
168
169 MCAPI void $disableBlockSimple();
170
171
172 // NOLINTEND
173
174public:
175 // vftables
176 // NOLINTBEGIN
177 MCNAPI static void** $vftable();
178 // NOLINTEND
179};
Definition Biome.h:24
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition BoundingBox.h:13
Definition ChunkPos.h:11
Definition Feature.h:19
Definition IBlockWorldGenAPI.h:25
MCAPI bool $canGetChunk() const
Definition LevelChunk.h:87
Definition LevelData.h:55
Definition Pos.h:5
Definition Random.h:10
Definition StructureSettings.h:18
Definition StructureTemplate.h:35
static MCAPI void ** $vftable()
Definition WorldGenContext.h:13
Definition context.h:5