LeviLamina
Loading...
Searching...
No Matches
LegacyStructureTemplate.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/Mirror.h"
7#include "mc/util/Rotation.h"
8#include "mc/world/level/BlockPos.h"
9#include "mc/world/level/chunk/NeighborAwareBlockUpdateType.h"
10#include "mc/world/level/levelgen/structure/ILegacyStructureTemplate.h"
11#include "mc/world/level/levelgen/structure/IStructureTemplate.h"
12#include "mc/world/level/levelgen/structure/LegacyStructureBlockPalette.h"
13
14// auto generated forward declare list
15// clang-format off
16class Block;
17class BlockSource;
18class CompoundTag;
23class Random;
24namespace br::worldgen { struct StructureTemplateBlockPalette; }
25// clang-format on
26
27class LegacyStructureTemplate : public ::ILegacyStructureTemplate, public ::IStructureTemplate {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 32, ::std::string> mAuthor;
32 ::ll::TypedStorage<4, 12, ::BlockPos> mSize;
33 ::ll::TypedStorage<4, 4, int> mDataVersion;
34 ::ll::TypedStorage<8, 64, ::LegacyStructureBlockPalette> mPalette;
35 ::ll::TypedStorage<8, 64, ::LegacyStructureBlockPalette> mExtraBlockPalette;
36 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyStructureBlockInfo>> mBlockInfo;
37 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyStructureActorInfo>> mEntityInfo;
38 // NOLINTEND
39
40public:
41 // virtual functions
42 // NOLINTBEGIN
43 virtual ~LegacyStructureTemplate() /*override*/;
44
45 virtual ::std::unordered_map<::BlockPos, ::std::string>
46 getMarkers(::BlockPos const& position, ::LegacyStructureSettings& settings) const /*override*/;
47
48 virtual void placeInWorld(
49 ::BlockSource& region,
50 ::BlockPos const& pos,
52 ::Random& random
53 ) const /*override*/;
54
55 virtual ::NeighborAwareBlockUpdateType shouldHandleUpgradeForBlock(::Block const& block) const /*override*/;
56
57 virtual ::BlockPos rawSize() const /*override*/;
58
59 virtual ::br::worldgen::StructureTemplateBlockPalette randomPalette(::BlockPos) const /*override*/;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI LegacyStructureTemplate();
66
67 MCFOLD ::IStructureTemplate const& asStructureTemplate() const;
68
69 MCAPI ::BlockPos calculateConnectedPosition(
70 ::LegacyStructureSettings const& settings1,
71 ::BlockPos const& connection1,
72 ::LegacyStructureSettings const& settings2,
73 ::BlockPos const& connection2
74 ) const;
75
76 MCAPI void finalizeBlockRules(
77 ::BlockSource& region,
78 ::BlockPos const& position,
81 ) const;
82
83 MCAPI ::std::vector<::JigsawStructureBlockInfo> getJigsawMarkers() const;
84
85 MCAPI ::BlockPos getSize(::Rotation rotation) const;
86
87 MCAPI void load(::CompoundTag const& tag);
88
89 MCAPI void placeInWorldChunk(
90 ::BlockSource& region,
91 ::BlockPos const& position,
93 ::Random& random
94 );
95 // NOLINTEND
96
97public:
98 // static functions
99 // NOLINTBEGIN
100 MCAPI static void _fixItemStack(::CompoundTag& itemTag, int dataVersion);
101
102 MCAPI static void _mapPropertiesToTags(::CompoundTag& originalTag, ::CompoundTag const& paletteTag);
103
104 MCAPI static ::Block const*
105 _mapPropertyToExtraBlock(::std::string const& propertyString, ::std::string const& valueString);
106
107 MCAPI static ::std::unique_ptr<::CompoundTag> _mapTag(
108 ::std::unique_ptr<::CompoundTag> originalTag,
109 ::std::string const& javaBlockName,
110 int dataVersion,
111 ::Block const*& block
112 );
113
114 MCAPI static ::Block const* _mapToBlock(::std::string const& blockName);
115
116 MCAPI static ::Block const& _mapToData(::Block const& curr, ::LegacyStructureSettings const& settings);
117
118 MCAPI static ::Block const*
119 _mapToProperty(::std::string const& propertyString, ::std::string const& valueString, ::Block const& block);
120
121 MCAPI static ::BlockPos
122 getZeroPositionWithTransform(::BlockPos const& zeroPos, ::Mirror mirror, ::Rotation rotation, int sizeX, int sizeZ);
123
124 MCAPI static ::BlockPos transform(::BlockPos pos, ::Mirror mirror, ::Rotation rotation);
125 // NOLINTEND
126
127public:
128 // static variables
129 // NOLINTBEGIN
130 MCAPI static ::std::string const& AUTHOR_TAG();
131
132 MCAPI static ::std::string const& BLOCKS_TAG();
133
134 MCAPI static ::std::string const& BLOCK_TAG_NBT();
135
136 MCAPI static ::std::string const& BLOCK_TAG_POS();
137
138 MCAPI static ::std::string const& BLOCK_TAG_STATE();
139
140 MCAPI static ::std::string const& DATA_VERSION_TAG();
141
142 MCAPI static ::std::string const& ENTITIES_TAG();
143
144 MCAPI static ::std::string const& ENTITY_TAG_BLOCKPOS();
145
146 MCAPI static ::std::string const& ENTITY_TAG_NBT();
147
148 MCAPI static ::std::string const& ENTITY_TAG_POS();
149
150 MCAPI static ::std::string const& MINECRAFT_PREFIX();
151
152 MCAPI static ::std::string const& PALETTE_TAG();
153
154 MCAPI static ::std::string const& SIZE_TAG();
155 // NOLINTEND
156
157public:
158 // constructor thunks
159 // NOLINTBEGIN
160 MCAPI void* $ctor();
161 // NOLINTEND
162
163public:
164 // destructor thunk
165 // NOLINTBEGIN
166 MCAPI void $dtor();
167 // NOLINTEND
168
169public:
170 // virtual function thunks
171 // NOLINTBEGIN
172 MCAPI ::std::unordered_map<::BlockPos, ::std::string>
173 $getMarkers(::BlockPos const& position, ::LegacyStructureSettings& settings) const;
174
175 MCAPI void $placeInWorld(
176 ::BlockSource& region,
177 ::BlockPos const& pos,
179 ::Random& random
180 ) const;
181
182 MCAPI ::NeighborAwareBlockUpdateType $shouldHandleUpgradeForBlock(::Block const& block) const;
183
184 MCAPI ::BlockPos $rawSize() const;
185
186 MCAPI ::br::worldgen::StructureTemplateBlockPalette $randomPalette(::BlockPos) const;
187
188
189 // NOLINTEND
190
191public:
192 // vftables
193 // NOLINTBEGIN
195
196 MCNAPI static void** $vftableForIStructureTemplate();
197 // NOLINTEND
198};
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition CompoundTag.h:23
Definition ILegacyStructureTemplate.h:13
Definition IStructureTemplate.h:15
Definition JigsawStructureBlockInfo.h:14
Definition LegacyStructureActorInfo.h:10
Definition LegacyStructureBlockInfo.h:14
Definition LegacyStructureSettings.h:22
static MCAPI void ** $vftableForIStructureTemplate()
static MCAPI void ** $vftableForILegacyStructureTemplate()
Definition Random.h:10
Definition StructureTemplateBlockPalette.h:18