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