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