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 CompoundTag;
21class Random;
22namespace br::worldgen { struct StructureTemplateBlockPalette; }
23// clang-format on
24
25class LegacyStructureTemplate : public ::ILegacyStructureTemplate, public ::IStructureTemplate {
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<8, 32, ::std::string> mAuthor;
30 ::ll::TypedStorage<4, 12, ::BlockPos> mSize;
31 ::ll::TypedStorage<4, 4, int> mDataVersion;
32 ::ll::TypedStorage<8, 64, ::LegacyStructureBlockPalette> mPalette;
33 ::ll::TypedStorage<8, 64, ::LegacyStructureBlockPalette> mExtraBlockPalette;
34 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyStructureBlockInfo>> mBlockInfo;
35 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyStructureActorInfo>> mEntityInfo;
36 // NOLINTEND
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual ~LegacyStructureTemplate() /*override*/;
42
43 virtual ::std::unordered_map<::BlockPos, ::std::string>
44 getMarkers(::BlockPos const& position, ::LegacyStructureSettings& settings) const /*override*/;
45
46 virtual void placeInWorld(
47 ::BlockSource& region,
48 ::BlockPos const& pos,
50 ::Random& random
51 ) const /*override*/;
52
53 virtual ::NeighborAwareBlockUpdateType shouldHandleUpgradeForBlock(::Block const& block) const /*override*/;
54
55 virtual ::BlockPos rawSize() const /*override*/;
56
57 virtual ::br::worldgen::StructureTemplateBlockPalette randomPalette(::BlockPos) const /*override*/;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI LegacyStructureTemplate();
64
65 MCAPI ::BlockPos calculateConnectedPosition(
66 ::LegacyStructureSettings const& settings1,
67 ::BlockPos const& connection1,
68 ::LegacyStructureSettings const& settings2,
69 ::BlockPos const& connection2
70 ) const;
71
72 MCAPI ::std::vector<::JigsawStructureBlockInfo> getJigsawMarkers() const;
73
74 MCAPI void load(::CompoundTag const& tag);
75 // NOLINTEND
76
77public:
78 // static functions
79 // NOLINTBEGIN
80 MCAPI static void _fixItemStack(::CompoundTag& itemTag, int dataVersion);
81
82 MCAPI static void _mapPropertiesToTags(::CompoundTag& originalTag, ::CompoundTag const& paletteTag);
83
84 MCAPI static void _mapPropertyToTag(
85 ::CompoundTag& originalTag,
86 ::std::string const& propertyString,
87 ::std::string const& valueString
88 );
89
90 MCAPI static ::std::unique_ptr<::CompoundTag> _mapTag(
91 ::std::unique_ptr<::CompoundTag> originalTag,
92 ::std::string const& javaBlockName,
93 int dataVersion,
94 ::Block const*& block
95 );
96
97 MCAPI static ::Block const* _mapToBlock(::std::string const& blockName);
98
99 MCAPI static ::Block const& _mapToData(::Block const& curr, ::LegacyStructureSettings const& settings);
100
101 MCAPI static ::Block const*
102 _mapToProperty(::std::string const& propertyString, ::std::string const& valueString, ::Block const& block);
103 // NOLINTEND
104
105public:
106 // static variables
107 // NOLINTBEGIN
108 MCAPI static ::std::string const& AUTHOR_TAG();
109
110 MCAPI static ::std::string const& BLOCKS_TAG();
111
112 MCAPI static ::std::string const& BLOCK_TAG_NBT();
113
114 MCAPI static ::std::string const& BLOCK_TAG_POS();
115
116 MCAPI static ::std::string const& BLOCK_TAG_STATE();
117
118 MCAPI static ::std::string const& DATA_VERSION_TAG();
119
120 MCAPI static ::std::string const& ENTITIES_TAG();
121
122 MCAPI static ::std::string const& ENTITY_TAG_BLOCKPOS();
123
124 MCAPI static ::std::string const& ENTITY_TAG_NBT();
125
126 MCAPI static ::std::string const& ENTITY_TAG_POS();
127
128 MCAPI static ::std::string const& MINECRAFT_PREFIX();
129
130 MCAPI static ::std::string const& PALETTE_TAG();
131
132 MCAPI static ::std::string const& SIZE_TAG();
133
134 MCAPI static ::std::string const& VERSION_TAG();
135 // NOLINTEND
136
137public:
138 // constructor thunks
139 // NOLINTBEGIN
140 MCAPI void* $ctor();
141 // NOLINTEND
142
143public:
144 // destructor thunk
145 // NOLINTBEGIN
146 MCAPI void $dtor();
147 // NOLINTEND
148
149public:
150 // virtual function thunks
151 // NOLINTBEGIN
152 MCAPI ::std::unordered_map<::BlockPos, ::std::string>
153 $getMarkers(::BlockPos const& position, ::LegacyStructureSettings& settings) const;
154
155 MCAPI void $placeInWorld(
156 ::BlockSource& region,
157 ::BlockPos const& pos,
159 ::Random& random
160 ) const;
161
162 MCAPI ::NeighborAwareBlockUpdateType $shouldHandleUpgradeForBlock(::Block const& block) const;
163
164 MCAPI ::BlockPos $rawSize() const;
165
166 MCAPI ::br::worldgen::StructureTemplateBlockPalette $randomPalette(::BlockPos) const;
167
168
169 // NOLINTEND
170
171public:
172 // vftables
173 // NOLINTBEGIN
175
176 MCNAPI static void** $vftableForIStructureTemplate();
177 // NOLINTEND
178};
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Block.h:43
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:11