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/deps/core/utility/AutomaticID.h"
7#include "mc/util/Random.h"
8#include "mc/world/Pos.h"
9#include "mc/world/level/PortalRecord.h"
10#include "mc/world/level/saveddata/SavedData.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class BaseGameVersion;
16class BlockPos;
17class BlockSource;
18class CompoundTag;
19class Dimension;
20class Level;
21class PortalShape;
23// clang-format on
24
25class PortalForcer : public ::SavedData {
26public:
27 // PortalForcer inner types declare
28 // clang-format off
29 class PortalPosition;
30 // clang-format on
31
32 // PortalForcer inner types define
33 class PortalPosition : public ::Pos {
34 public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<4, 4, int> lastUsed;
38 // NOLINTEND
39 };
40
41 using CachedPortalMap = ::std::unordered_map<::BlockPos, ::PortalForcer::PortalPosition>;
42
43 using PortalRecordSet = ::std::unordered_set<::PortalRecord>;
44
45public:
46 // member variables
47 // NOLINTBEGIN
48 ::ll::TypedStorage<8, 8, ::Level&> mLevel;
49 ::ll::TypedStorage<8, 2568, ::Random> mRandom;
50 ::ll::TypedStorage<8, 64, ::std::unordered_map<::DimensionType, ::std::unordered_set<::PortalRecord>>>
51 mPortalRecords;
52 // NOLINTEND
53
54public:
55 // prevent constructor by default
56 PortalForcer& operator=(PortalForcer const&);
59
60public:
61 // virtual functions
62 // NOLINTBEGIN
63 // vIndex: 1
64 virtual void deserialize(::CompoundTag const& tag) /*override*/;
65
66 // vIndex: 2
67 virtual void serialize(::CompoundTag& tag) const /*override*/;
68
69 // vIndex: 0
70 virtual ~PortalForcer() /*override*/;
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCAPI ::std::optional<::PortalRecord> _findPortal(
77 ::DimensionType dimensionId,
78 ::BlockPos const& centerBlockPos,
79 int radius,
80 ::BlockPos& targetBlockPos
81 ) const;
82
83 MCAPI ::PortalRecord const& createPortal(::Actor const& entity, int radius);
84
85 MCAPI void force(::Actor& entity, ::DimensionTransitionComponent const& portalEntranceComponent);
86
87 MCAPI void removeMisalignedPortalRecords(
88 ::BlockSource& region,
89 ::PortalShape const& referenceShape,
90 ::PortalRecord const& referenceRecord
91 );
92
93 MCAPI void removePortalRecord(::BlockSource& source, ::BlockPos const& pos);
94 // NOLINTEND
95
96public:
97 // static functions
98 // NOLINTBEGIN
99 MCAPI static bool canPortalReplaceBlock(::BlockSource& region, ::BlockPos const& blockPos);
100 // NOLINTEND
101
102public:
103 // static variables
104 // NOLINTBEGIN
105 MCAPI static ::BaseGameVersion const& MIN_PORTAL_REPLACE_BLOCK_FIX_VERSION();
106
107 MCAPI static ::std::string const& PORTAL_FILE_ID();
108 // NOLINTEND
109
110public:
111 // destructor thunk
112 // NOLINTBEGIN
113 MCAPI void $dtor();
114 // NOLINTEND
115
116public:
117 // virtual function thunks
118 // NOLINTBEGIN
119 MCAPI void $deserialize(::CompoundTag const& tag);
120
121 MCAPI void $serialize(::CompoundTag& tag) const;
122 // NOLINTEND
123
124public:
125 // vftables
126 // NOLINTBEGIN
127 MCNAPI static void** $vftable();
128 // NOLINTEND
129};
Definition Actor.h:103
Definition AutomaticID.h:6
Definition BaseGameVersion.h:8
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition CompoundTag.h:13
Definition Dimension.h:83
Definition Level.h:239
Definition PortalForcer.h:33
Definition PortalForcer.h:25
static MCAPI void ** $vftable()
Definition PortalRecord.h:8
Definition PortalShape.h:17
Definition Pos.h:5
Definition SavedData.h:10
Definition DimensionTransitionComponent.h:15
Definition serialize.h:11