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/world/level/BlockPos.h"
7#include "mc/world/level/chunk/NeighborAwareBlockUpdateType.h"
8#include "mc/world/level/levelgen/structure/ILegacyStructureTemplate.h"
9#include "mc/world/level/levelgen/structure/IStructureTemplate.h"
10#include "mc/world/level/levelgen/structure/LegacyStructureBlockPalette.h"
11
12// auto generated forward declare list
13// clang-format off
14class Block;
15class BlockSource;
16class BlockType;
17class CompoundTag;
22class 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 MCAPI ::Block const* _fixExtraWaterBlock(::BlockType const& blockType);
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::unordered_map<::BlockPos, ::StructureSpawnEntityInfo>
84 getEntitiesToPlace(::BlockPos const& position, ::LegacyStructureSettings& settings) const;
85
86 MCAPI ::std::vector<::JigsawStructureBlockInfo> getJigsawMarkers() const;
87
88 MCAPI void load(::CompoundTag const& tag);
89 // NOLINTEND
90
91public:
92 // static functions
93 // NOLINTBEGIN
94 MCAPI static void _fixItemStack(::CompoundTag& itemTag, int const dataVersion);
95
96 MCAPI static void _mapPropertiesToTags(::CompoundTag& originalTag, ::CompoundTag const& paletteTag);
97
98 MCAPI static ::std::unique_ptr<::CompoundTag> _mapTag(
99 ::std::unique_ptr<::CompoundTag> originalTag,
100 ::std::string const& javaBlockName,
101 int dataVersion,
102 ::Block const*& block
103 );
104
105 MCAPI static ::Block const* _mapToBlock(::std::string const& blockName);
106
107 MCAPI static ::Block const& _mapToData(::Block const& curr, ::LegacyStructureSettings const& settings);
108
109 MCAPI static ::Block const*
110 _mapToProperty(::std::string const& propertyString, ::std::string const& valueString, ::Block const& block);
111 // NOLINTEND
112
113public:
114 // static variables
115 // NOLINTBEGIN
116 MCAPI static ::std::string const& AUTHOR_TAG();
117
118 MCAPI static ::std::string const& BLOCKS_TAG();
119
120 MCAPI static ::std::string const& BLOCK_TAG_NBT();
121
122 MCAPI static ::std::string const& BLOCK_TAG_POS();
123
124 MCAPI static ::std::string const& BLOCK_TAG_STATE();
125
126 MCAPI static ::std::string const& DATA_VERSION_TAG();
127
128 MCAPI static ::std::string const& ENTITIES_TAG();
129
130 MCAPI static ::std::string const& ENTITY_TAG_BLOCKPOS();
131
132 MCAPI static ::std::string const& ENTITY_TAG_NBT();
133
134 MCAPI static ::std::string const& ENTITY_TAG_POS();
135
136 MCAPI static ::std::string const& MINECRAFT_PREFIX();
137
138 MCAPI static ::std::string const& PALETTE_TAG();
139
140 MCAPI static ::std::string const& SIZE_TAG();
141 // NOLINTEND
142
143public:
144 // constructor thunks
145 // NOLINTBEGIN
146 MCAPI void* $ctor();
147 // NOLINTEND
148
149public:
150 // destructor thunk
151 // NOLINTBEGIN
152 MCAPI void $dtor();
153 // NOLINTEND
154
155public:
156 // virtual function thunks
157 // NOLINTBEGIN
158 MCAPI ::std::unordered_map<::BlockPos, ::std::string>
159 $getMarkers(::BlockPos const& position, ::LegacyStructureSettings& settings) const;
160
161 MCAPI void $placeInWorld(
162 ::BlockSource& region,
163 ::BlockPos const& pos,
165 ::Random& random
166 ) const;
167
168 MCAPI ::NeighborAwareBlockUpdateType $shouldHandleUpgradeForBlock(::Block const& block) const;
169
170 MCAPI ::BlockPos $rawSize() const;
171
172 MCAPI ::br::worldgen::StructureTemplateBlockPalette $randomPalette(::BlockPos) const;
173
174
175 // NOLINTEND
176
177public:
178 // vftables
179 // NOLINTBEGIN
181
182 MCNAPI static void** $vftableForIStructureTemplate();
183 // NOLINTEND
184};
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition BlockType.h:79
Definition Block.h:41
Definition CompoundTag.h:18
Definition ILegacyStructureTemplate.h:13
Definition IStructureTemplate.h:15
Definition JigsawStructureBlockInfo.h:14
Definition LegacyStructureActorInfo.h:10
Definition LegacyStructureBlockInfo.h:14
Definition LegacyStructureSettings.h:21
static MCAPI void ** $vftableForIStructureTemplate()
static MCAPI void ** $vftableForILegacyStructureTemplate()
Definition Random.h:10
Definition StructureSpawnEntityInfo.h:10
Definition StructureTemplateBlockPalette.h:11