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