LeviLamina
Loading...
Searching...
No Matches
worldgen.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/levelgen/structure/Projection.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockPos;
13class BlockSource;
14class BoundingBox;
15class IRandom;
20namespace JigsawStructureUtils { class MetadataCache; }
21namespace SharedTypes::v1_21_80 { class JigsawBlockMetadata; }
22namespace SharedTypes::v1_21_80 { struct JigsawStructureMetadata; }
23namespace br::worldgen { struct StructureBlockInfo; }
24namespace br::worldgen { struct StructurePlaceSettings; }
25namespace br::worldgen { struct StructureProcessor; }
26namespace br::worldgen { struct StructureTemplateBlockPalette; }
27// clang-format on
28
29namespace br::worldgen {
30// functions
31// NOLINTBEGIN
32MCAPI int expansionHackCalc(
33 ::JigsawStructureUtils::MetadataCache& cache,
34 ::BlockPos const& offset,
35 ::Rotation rotation,
36 ::BoundingBox const& box,
37 ::std::vector<::SharedTypes::v1_21_80::JigsawBlockMetadata> const& targetJigsaws,
38 ::std::vector<uint64> const& targetJigsawIndexes,
39 ::JigsawStructureRegistry const& pools
40);
41
42MCAPI void expansionHackEval(int expandTo, ::BoundingBox& box);
43
44MCAPI ::std::vector<uint64> getJigsawBlockIds(::StructureTemplatePool const& pool);
45
46MCAPI ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>> const&
47getProjectionProcessors(::Projection projection);
48
49MCFOLD int noopCalc(
50 ::JigsawStructureUtils::MetadataCache&,
51 ::BlockPos const&,
52 ::Rotation,
53 ::BoundingBox const&,
54 ::std::vector<::SharedTypes::v1_21_80::JigsawBlockMetadata> const&,
55 ::std::vector<uint64> const&,
56 ::JigsawStructureRegistry const&
57);
58
59MCFOLD void noopEval(int, ::BoundingBox&);
60
61MCAPI bool placeInWorld(
62 ::IStructureTemplate const& tmpl,
63 ::BlockSource& region,
64 ::BlockPos position,
65 ::BlockPos structureOrigin,
66 ::br::worldgen::StructurePlaceSettings const& settings,
67 ::IRandom& random
68);
69
70MCAPI ::std::vector<::br::worldgen::StructureBlockInfo> processBlockInfos(
71 ::BlockSource& region,
72 ::BlockPos position,
73 ::BlockPos structureOrigin,
74 ::br::worldgen::StructurePlaceSettings const& settings,
75 ::br::worldgen::StructureTemplateBlockPalette sourceBlockInfos
76);
77
78MCAPI ::std::optional<::BlockPos> randomNamedJigsawLocation(
79 ::StructurePoolElement const& source,
80 ::std::string_view name,
81 ::BlockPos pos,
82 ::Rotation rot,
83 ::IRandom& random
84);
85
86MCAPI ::std::vector<uint64>
87shuffledJigsawBlockIndexes(::SharedTypes::v1_21_80::JigsawStructureMetadata const& metadata, ::IRandom& random);
88
89MCAPI ::BlockPos transform(::BlockPos pos, ::Mirror mirror, ::Rotation rotation, ::BlockPos pivot);
90// NOLINTEND
91
92} // namespace br::worldgen
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition BoundingBox.h:13
Definition IRandom.h:10
Definition IStructureTemplate.h:15
Definition JigsawStructureRegistry.h:22
Definition MetadataCache.h:13
Definition JigsawBlockMetadata.h:16
Definition StructurePoolElement.h:40
Definition StructureTemplatePool.h:16
Definition JigsawStructureMetadata.h:16
Definition StructureBlockInfo.h:16
Definition StructurePlaceSettings.h:18
Definition StructureProcessor.h:23
Definition StructureTemplateBlockPalette.h:18