LeviLamina
Loading...
Searching...
No Matches
DespawnComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/Randomize.h"
7
8// auto generated forward declare list
9// clang-format off
10class Actor;
11class BlockPos;
12class ChunkPos;
14class Player;
15class Vec3;
16// clang-format on
17
19public:
20 // DespawnComponent inner types declare
21 // clang-format off
22 class IWorldAccessor;
23 class WorldAccessor;
24 // clang-format on
25
26 // DespawnComponent inner types define
28 public:
29 // virtual functions
30 // NOLINTBEGIN
31 virtual ~IWorldAccessor();
32
33 virtual ::Player* fetchAnyInteractablePlayer(::Vec3 const&, float) const = 0;
34
35 virtual uint getChunkTickRange() const = 0;
36
37 virtual bool areChunksFullyLoaded(::BlockPos const&, int) const = 0;
38
39 virtual bool hasUntickedNeighborChunk(::ChunkPos const&, int) const = 0;
40
41 virtual ::Randomize& getChanceRandomize() = 0;
42
43 virtual ::std::optional<int> getActorNoActionTime(::Actor const&) const = 0;
44
45 virtual void resetActorNoActionTime(::Actor&) = 0;
46 // NOLINTEND
47
48 public:
49 // destructor thunk
50 // NOLINTBEGIN
51 MCFOLD void $dtor();
52 // NOLINTEND
53
54 public:
55 // virtual function thunks
56 // NOLINTBEGIN
57
58 // NOLINTEND
59
60 public:
61 // vftables
62 // NOLINTBEGIN
63 MCNAPI static void** $vftable();
64 // NOLINTEND
65 };
66
67 class WorldAccessor : public ::DespawnComponent::IWorldAccessor {
68 public:
69 // member variables
70 // NOLINTBEGIN
71 ::ll::TypedStorage<8, 8, ::Actor&> mActor;
72 ::ll::TypedStorage<8, 24, ::Randomize> mActorRandomize;
73 // NOLINTEND
74
75 public:
76 // prevent constructor by default
77 WorldAccessor& operator=(WorldAccessor const&);
78 WorldAccessor(WorldAccessor const&);
79 WorldAccessor();
80
81 public:
82 // virtual functions
83 // NOLINTBEGIN
84 virtual ::Player* fetchAnyInteractablePlayer(::Vec3 const& searchPos, float maxDist) const /*override*/;
85
86 virtual uint getChunkTickRange() const /*override*/;
87
88 virtual bool areChunksFullyLoaded(::BlockPos const& min, int r) const /*override*/;
89
90 virtual bool hasUntickedNeighborChunk(::ChunkPos const& pos, int chunkRadius) const /*override*/;
91
92 virtual ::Randomize& getChanceRandomize() /*override*/;
93
94 virtual ::std::optional<int> getActorNoActionTime(::Actor const& actor) const /*override*/;
95
96 virtual void resetActorNoActionTime(::Actor& actor) /*override*/;
97
98 virtual ~WorldAccessor() /*override*/;
99 // NOLINTEND
100
101 public:
102 // destructor thunk
103 // NOLINTBEGIN
104 MCAPI void $dtor();
105 // NOLINTEND
106
107 public:
108 // virtual function thunks
109 // NOLINTBEGIN
110 MCAPI ::Player* $fetchAnyInteractablePlayer(::Vec3 const& searchPos, float maxDist) const;
111
112 MCAPI uint $getChunkTickRange() const;
113
114 MCAPI bool $areChunksFullyLoaded(::BlockPos const& min, int r) const;
115
116 MCAPI bool $hasUntickedNeighborChunk(::ChunkPos const& pos, int chunkRadius) const;
117
118 MCFOLD ::Randomize& $getChanceRandomize();
119
120 MCAPI ::std::optional<int> $getActorNoActionTime(::Actor const& actor) const;
121
122 MCAPI void $resetActorNoActionTime(::Actor& actor);
123
124
125 // NOLINTEND
126
127 public:
128 // vftables
129 // NOLINTBEGIN
130 MCNAPI static void** $vftable();
131 // NOLINTEND
132 };
133
134public:
135 // member functions
136 // NOLINTBEGIN
137 MCAPI bool _softRulesPrescribeDespawn(
138 ::Actor& actor,
139 ::DespawnDefinition const& definition,
141 ) const;
142
143 MCAPI bool _tryStandardDespawnRules(
144 ::Actor& actor,
145 ::DespawnDefinition const& definition,
147 ) const;
148
149 MCAPI void tick(::Actor& actor);
150 // NOLINTEND
151};
Definition Actor.h:105
Definition BlockPos.h:19
Definition ChunkPos.h:11
Definition DespawnComponent.h:27
static MCAPI void ** $vftable()
Definition DespawnComponent.h:67
static MCAPI void ** $vftable()
Definition DespawnComponent.h:18
Definition DespawnDefinition.h:13
Definition Player.h:125
Definition Vec3.h:10