Skip to content
LeviMC
English
AutoLightDark
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
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
66
67#ifdef LL_PLAT_C
68 MCNAPI ::Block const* _fixExtraWaterBlock(::BlockType const& blockType);
69#endif
70
71 MCNAPI ::BlockPos calculateConnectedPosition(
72 ::LegacyStructureSettings const& settings1,
73 ::BlockPos const& connection1,
74 ::LegacyStructureSettings const& settings2,
75 ::BlockPos const& connection2
76 ) const;
77
78 MCNAPI void finalizeBlockRules(
79 ::BlockSource& region,
80 ::BlockPos const& position,
83 ) const;
84
85 MCNAPI ::std::unordered_map<::BlockPos, ::StructureSpawnEntityInfo>
86 getEntitiesToPlace(::BlockPos const& position, ::LegacyStructureSettings& settings) const;
87
88 MCNAPI ::std::vector<::JigsawStructureBlockInfo> getJigsawMarkers() const;
89 // NOLINTEND
90
91public:
92 // static functions
93 // NOLINTBEGIN
94 MCNAPI static void _fixItemStack(::CompoundTag& itemTag, int const dataVersion);
95
96#ifdef LL_PLAT_C
97 MCNAPI static void _mapPropertiesToTags(::CompoundTag& originalTag, ::CompoundTag const& paletteTag);
98#endif
99
100#ifdef LL_PLAT_S
101 MCNAPI static void _mapPropertiesToTags(::CompoundTag& originalTag, ::CompoundTag const& paletteTag);
102#endif
103
104#ifdef LL_PLAT_C
105 MCNAPI static ::Block const*
106 _mapPropertyToExtraBlock(::std::string const& propertyString, ::std::string const& valueString);
107
108 MCNAPI static ::std::unique_ptr<::CompoundTag> _mapTag(
109 ::std::unique_ptr<::CompoundTag> originalTag,
110 ::std::string const& javaBlockName,
111 int dataVersion,
112 ::Block const*& block
113 );
114#endif
115
116#ifdef LL_PLAT_S
117 MCNAPI static ::std::unique_ptr<::CompoundTag> _mapTag(
118 ::std::unique_ptr<::CompoundTag> originalTag,
119 ::std::string const& javaBlockName,
120 int const dataVersion,
121 ::Block const*& block
122 );
123#endif
124
125 MCNAPI static ::Block const* _mapToBlock(::std::string const& blockName);
126
127 MCNAPI static ::Block const& _mapToData(::Block const& curr, ::LegacyStructureSettings const& settings);
128
129 MCNAPI static ::Block const*
130 _mapToProperty(::std::string const& propertyString, ::std::string const& valueString, ::Block const& block);
131 // NOLINTEND
132
133public:
134 // static variables
135 // NOLINTBEGIN
136 MCNAPI static ::std::string const& AUTHOR_TAG();
137
138 MCNAPI static ::std::string const& BLOCKS_TAG();
139
140 MCNAPI static ::std::string const& BLOCK_TAG_NBT();
141
142 MCNAPI static ::std::string const& BLOCK_TAG_POS();
143
144 MCNAPI static ::std::string const& BLOCK_TAG_STATE();
145
146 MCNAPI static ::std::string const& DATA_VERSION_TAG();
147
148 MCNAPI static ::std::string const& ENTITIES_TAG();
149
150 MCNAPI static ::std::string const& ENTITY_TAG_BLOCKPOS();
151
152 MCNAPI static ::std::string const& ENTITY_TAG_NBT();
153
154 MCNAPI static ::std::string const& ENTITY_TAG_POS();
155
156 MCNAPI static ::std::string const& MINECRAFT_PREFIX();
157
158 MCNAPI static ::std::string const& PALETTE_TAG();
159
160 MCNAPI static ::std::string const& SIZE_TAG();
161 // NOLINTEND
162
163public:
164 // constructor thunks
165 // NOLINTBEGIN
166 MCNAPI void* $ctor();
167 // NOLINTEND
168
169public:
170 // destructor thunk
171 // NOLINTBEGIN
172 MCNAPI void $dtor();
173 // NOLINTEND
174
175public:
176 // virtual function thunks
177 // NOLINTBEGIN
178 MCNAPI ::std::unordered_map<::BlockPos, ::std::string>
179 $getMarkers(::BlockPos const& position, ::LegacyStructureSettings& settings) const;
180
181 MCNAPI void $placeInWorld(
182 ::BlockSource& region,
183 ::BlockPos const& pos,
185 ::Random& random
186 ) const;
187
188 MCNAPI ::NeighborAwareBlockUpdateType $shouldHandleUpgradeForBlock(::Block const& block) const;
189
190 MCNAPI ::BlockPos $rawSize() const;
191
192 MCNAPI ::br::worldgen::StructureTemplateBlockPalette $randomPalette(::BlockPos) const;
193
194
195 // NOLINTEND
196
197public:
198 // vftables
199 // NOLINTBEGIN
201
202 MCNAPI static void** $vftableForIStructureTemplate();
203 // NOLINTEND
204};
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition BlockType.h:79
Definition Block.h:42
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
MCAPI void * $ctor()
MCAPI ::std::unordered_map<::BlockPos, ::std::string > $getMarkers(::BlockPos const &position, ::LegacyStructureSettings &settings) const
static MCAPI ::std::string const & ENTITY_TAG_POS()
static MCAPI ::std::string const & ENTITY_TAG_BLOCKPOS()
MCAPI ::std::unordered_map<::BlockPos, ::StructureSpawnEntityInfo > getEntitiesToPlace(::BlockPos const &position, ::LegacyStructureSettings &settings) const
static MCAPI ::std::string const & BLOCK_TAG_STATE()
static MCAPI void ** $vftableForIStructureTemplate()
static MCAPI ::std::string const & MINECRAFT_PREFIX()
static MCAPI ::std::string const & BLOCKS_TAG()
static MCAPI void _fixItemStack(::CompoundTag &itemTag, int const dataVersion)
MCAPI void finalizeBlockRules(::BlockSource &region, ::BlockPos const &position, ::LegacyStructureSettings &settings, ::Random &) const
static MCAPI void ** $vftableForILegacyStructureTemplate()
static MCAPI ::std::string const & BLOCK_TAG_NBT()
MCAPI::BlockPos calculateConnectedPosition(::LegacyStructureSettings const &settings1, ::BlockPos const &connection1, ::LegacyStructureSettings const &settings2, ::BlockPos const &connection2) const
MCAPI::BlockPos $rawSize() const
static MCAPI ::std::string const & ENTITIES_TAG()
MCAPI::br::worldgen::StructureTemplateBlockPalette $randomPalette(::BlockPos) const
static MCAPI ::std::string const & AUTHOR_TAG()
static MCAPI ::std::string const & BLOCK_TAG_POS()
static MCAPI ::std::string const & DATA_VERSION_TAG()
static MCAPI ::std::string const & SIZE_TAG()
MCAPI::NeighborAwareBlockUpdateType $shouldHandleUpgradeForBlock(::Block const &block) const
static MCAPI ::std::string const & ENTITY_TAG_NBT()
MCAPI ::std::vector<::JigsawStructureBlockInfo > getJigsawMarkers() const
static MCAPI ::Block const & _mapToData(::Block const &curr, ::LegacyStructureSettings const &settings)
MCAPI void $placeInWorld(::BlockSource &region, ::BlockPos const &pos, ::LegacyStructureSettings &settings, ::Random &random) const
static MCAPI ::Block const * _mapToProperty(::std::string const &propertyString, ::std::string const &valueString, ::Block const &block)
static MCAPI ::Block const * _mapToBlock(::std::string const &blockName)
static MCAPI ::std::string const & PALETTE_TAG()
Definition Random.h:10
Definition StructureSpawnEntityInfo.h:10
Definition StructureTemplateBlockPalette.h:11