LeviLamina
Loading...
Searching...
No Matches
LevelChunkVolumeData.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/WeightedRandomList.h"
7#include "mc/world/actor/spawn_category/Type.h"
8#include "mc/world/level/BlockPos.h"
9#include "mc/world/level/ChunkPos.h"
10#include "mc/world/level/chunk/LevelChunkDataRegistry.h"
11
12// auto generated forward declare list
13// clang-format off
14class IDataInput;
15class IDataOutput;
17class StructureStart;
18class Vec3;
19namespace br::worldgen { class StructureInstance; }
20namespace br::worldgen { struct SpawnerData; }
21// clang-format on
22
23class LevelChunkVolumeData {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::br::worldgen::StructureInstance const>>> mStructures;
28 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::br::worldgen::StructureInstance const>>>
29 mStructureReferences;
30 ::ll::TypedStorage<8, 768, ::br::LevelChunkDataRegistry> mDataRegistry;
31 ::ll::TypedStorage<4, 12, ::BlockPos> mMin;
32 ::ll::TypedStorage<4, 12, ::BlockPos> mMax;
33 ::ll::TypedStorage<8, 8, ::ChunkPos> mChunkPos;
34 ::ll::TypedStorage<8, 8, ::StructureSpawnRegistry const&> mStructureSpawnRegistry;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 LevelChunkVolumeData& operator=(LevelChunkVolumeData const&);
40 LevelChunkVolumeData(LevelChunkVolumeData const&);
41 LevelChunkVolumeData();
42
43public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI void addStructure(::std::shared_ptr<::br::worldgen::StructureInstance const> instance);
47
48 MCFOLD void addStructure(::StructureStart const& start);
49
50 MCAPI void addStructureReference(::std::shared_ptr<::br::worldgen::StructureInstance const> instance);
51
52 MCFOLD void addStructureReference(::StructureStart const& start);
53
54 MCAPI void deserializeAabbVolumes(::IDataInput& stream);
55
56 MCAPI void deserializeHardcodedSpawners(::IDataInput& stream);
57
58 MCAPI ::std::optional<::WeightedRandomList<::br::worldgen::SpawnerData>>
59 dynamicMobsAt(::BlockPos pos, ::SpawnCategory::Type category) const;
60
61 MCAPI ::std::vector<::std::string> getStructuresAt(::Vec3 position) const;
62
63 MCAPI ::std::optional<::WeightedRandomList<::br::worldgen::SpawnerData>>
64 mobsAt(::BlockPos pos, ::SpawnCategory::Type category) const;
65
66 MCAPI bool serializeAabbVolumes(::IDataOutput& stream) const;
67
68 MCAPI ::std::vector<::BlockPos> structureSpawnPos() const;
69
70 MCAPI ~LevelChunkVolumeData();
71 // NOLINTEND
72
73public:
74 // destructor thunk
75 // NOLINTBEGIN
76 MCAPI void $dtor();
77 // NOLINTEND
78};
Definition BlockPos.h:21
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition StructureSpawnRegistry.h:14
Definition StructureStart.h:15
Definition Vec3.h:10
Definition StructureInstance.h:22
Definition SpawnerData.h:13