LeviLamina
Loading...
Searching...
No Matches
PortalForcer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/Random.h"
7#include "mc/world/level/PortalRecord.h"
8#include "mc/world/level/dimension/DimensionType.h"
9#include "mc/world/level/saveddata/SavedData.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BaseGameVersion;
15class BlockPos;
16class BlockSource;
17class CompoundTag;
18class Level;
19class PortalShape;
21// clang-format on
22
23class PortalForcer : public ::SavedData {
24public:
25 // PortalForcer inner types declare
26 // clang-format off
27 class PortalPosition;
28 // clang-format on
29
30 // PortalForcer inner types define
32
33 using CachedPortalMap = ::std::unordered_map<::BlockPos, ::PortalForcer::PortalPosition>;
34
35 using PortalRecordSet = ::std::unordered_set<::PortalRecord>;
36
37public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<8, 8, ::Level&> mLevel;
41 ::ll::TypedStorage<8, 2544, ::Random> mRandom;
42 ::ll::TypedStorage<8, 64, ::std::unordered_map<::DimensionType, ::std::unordered_set<::PortalRecord>>>
43 mPortalRecords;
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
48 PortalForcer& operator=(PortalForcer const&);
49 PortalForcer(PortalForcer const&);
50 PortalForcer();
51
52public:
53 // virtual functions
54 // NOLINTBEGIN
55 virtual void deserialize(::CompoundTag const& tag) /*override*/;
56
57 virtual void serialize(::CompoundTag& tag) const /*override*/;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI ::std::optional<::PortalRecord> _findPortal(
64 ::DimensionType dimensionId,
65 ::BlockPos const& centerBlockPos,
66 int radius,
67 ::BlockPos& targetBlockPos
68 ) const;
69
70 MCAPI void force(::Actor& entity, ::DimensionTransitionComponent const& portalEntranceComponent);
71
72 MCAPI void removeMisalignedPortalRecords(
73 ::BlockSource& region,
74 ::PortalShape const& referenceShape,
75 ::PortalRecord const& referenceRecord
76 );
77
78 MCAPI void removePortalRecord(::BlockSource& source, ::BlockPos const& pos);
79 // NOLINTEND
80
81public:
82 // static variables
83 // NOLINTBEGIN
84 MCAPI static ::BaseGameVersion const& MIN_PORTAL_REPLACE_BLOCK_FIX_VERSION();
85
86 MCAPI static ::std::string const& PORTAL_FILE_ID();
87 // NOLINTEND
88
89public:
90 // virtual function thunks
91 // NOLINTBEGIN
92 MCAPI void $deserialize(::CompoundTag const& tag);
93
94 MCAPI void $serialize(::CompoundTag& tag) const;
95
96
97 // NOLINTEND
98
99public:
100 // vftables
101 // NOLINTBEGIN
102 MCNAPI static void** $vftable();
103 // NOLINTEND
104};
Definition Actor.h:114
Definition BaseGameVersion.h:8
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition CompoundTag.h:18
Definition Level.h:253
Definition PortalForcer.h:31
static MCAPI void ** $vftable()
Definition PortalRecord.h:8
Definition PortalShape.h:17
Definition SavedData.h:10
Definition DimensionTransitionComponent.h:17
Definition DimensionType.h:5