LeviLamina
Loading...
Searching...
No Matches
LegacyGoalDefinition.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
8#include "mc/deps/shared_types/legacy/actor/ActorDamageCause.h"
9#include "mc/deps/shared_types/v1_26_20/block/MaterialType.h"
10#include "mc/util/FloatRange.h"
11#include "mc/util/IntRange.h"
12#include "mc/util/TargetSelectionMethod.h"
13#include "mc/world/actor/ActorCategory.h"
14#include "mc/world/actor/ActorDefinitionIdentifier.h"
15#include "mc/world/actor/ActorDefinitionTrigger.h"
16#include "mc/world/actor/ActorFilterGroup.h"
17#include "mc/world/actor/ai/village/POIType.h"
18#include "mc/world/item/ItemDescriptor.h"
19#include "mc/world/level/block/BlockDescriptor.h"
20
21// auto generated forward declare list
22// clang-format off
23class BaseGoal;
24class Mob;
26struct DrinkPotionData;
27struct MobDescriptor;
28struct SendEventData;
29struct SummonSpellData;
30// clang-format on
31
32struct LegacyGoalDefinition {
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 32, ::std::string> mName;
37 ::ll::TypedStorage<4, 4, int> mPriority;
38 ::ll::TypedStorage<4, 4, int> mRequiredControlFlags;
39 ::ll::TypedStorage<4, 4, int> mScanInterval;
40 ::ll::TypedStorage<4, 4, float> mTargetSearchHeight;
41 ::ll::TypedStorage<4, 4, int> mPersistTargetTicks;
42 ::ll::TypedStorage<1, 1, bool> mNearestSetPersistent;
43 ::ll::TypedStorage<4, 4, float> mWithinDefault;
44 ::ll::TypedStorage<4, 4, float> mMaxDist;
45 ::ll::TypedStorage<4, 4, float> mWalkSpeedModifier;
46 ::ll::TypedStorage<4, 4, float> mSprintSpeedModifier;
47 ::ll::TypedStorage<8, 24, ::std::vector<::MobDescriptor>> mMobDescriptions;
48 ::ll::TypedStorage<4, 4, float> mSneakSpeedModifier;
49 ::ll::TypedStorage<8, 32, ::std::string> mPreferredActorType;
50 ::ll::TypedStorage<1, 1, bool> mUseHomePositionRestrictionFollowMob;
51 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mFollowMobFilters;
52 ::ll::TypedStorage<4, 4, float> mStartDistance;
53 ::ll::TypedStorage<4, 8, ::std::optional<float>> mStopDistance;
54 ::ll::TypedStorage<1, 1, bool> mCanTeleport;
55 ::ll::TypedStorage<4, 4, int> mPostTeleportDistance;
56 ::ll::TypedStorage<1, 1, bool> mIgnoreVibrations;
57 ::ll::TypedStorage<4, 4, float> mMaxDistance;
58 ::ll::TypedStorage<4, 4, float> mYd;
59 ::ll::TypedStorage<1, 1, bool> mLeapSetPersistent;
60 ::ll::TypedStorage<4, 4, float> mStalkSpeed;
61 ::ll::TypedStorage<4, 4, float> mMaxStalkDist;
62 ::ll::TypedStorage<4, 4, float> mLeapHeight;
63 ::ll::TypedStorage<4, 4, float> mLeapDistance;
64 ::ll::TypedStorage<4, 4, float> mPounceMaxDistance;
65 ::ll::TypedStorage<4, 4, float> mStrikeDistance;
66 ::ll::TypedStorage<4, 4, float> mStuckTime;
67 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mBlockFilter;
68 ::ll::TypedStorage<1, 1, bool> mStalkSetPersistent;
69 ::ll::TypedStorage<4, 4, float> mLookDistance;
70 ::ll::TypedStorage<4, 4, int> mAngleOfViewX;
71 ::ll::TypedStorage<4, 4, int> mAngleOfViewY;
72 ::ll::TypedStorage<4, 4, float> mProbability;
73 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mTargetFilter;
74 ::ll::TypedStorage<4, 4, int> mMinLookTime;
75 ::ll::TypedStorage<4, 4, int> mMaxLookTime;
76 ::ll::TypedStorage<1, 1, bool> mContinueSitting;
77 ::ll::TypedStorage<1, 1, bool> mContinueIfLeashed;
78 ::ll::TypedStorage<4, 4, float> mMinAngleOfViewY;
79 ::ll::TypedStorage<4, 4, float> mMaxAngleOfViewY;
80 ::ll::TypedStorage<4, 4, int> mMinLookCount;
81 ::ll::TypedStorage<4, 4, int> mMaxLookCount;
82 ::ll::TypedStorage<4, 4, int> mRandomLookAroundCooldown;
83 ::ll::TypedStorage<4, 4, float> mMinimumRadius;
84 ::ll::TypedStorage<1, 1, bool> mBroadcast;
85 ::ll::TypedStorage<4, 4, float> mBroadcastRange;
86 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mWithinRadiusEvent;
87 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mHurtByTargetEvent;
88 ::ll::TypedStorage<4, 4, float> mPercentChance;
89 ::ll::TypedStorage<4, 4, ::ActorCategory> mAttackTypes;
90 ::ll::TypedStorage<4, 4, int> mRandomStopInterval;
91 ::ll::TypedStorage<4, 4, float> mReachMultiplier;
92 ::ll::TypedStorage<4, 4, float> mMeleeFOV;
93 ::ll::TypedStorage<1, 1, bool> mAttackOnce;
94 ::ll::TypedStorage<4, 4, int> mRandomSoundInterval;
95 ::ll::TypedStorage<1, 1, bool> mRequireCompletePath;
96 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnAttack;
97 ::ll::TypedStorage<4, 4, float> mAttackDuration;
98 ::ll::TypedStorage<4, 4, float> mHitDelay;
99 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::LevelSoundEvent> mDelayedAttackSound;
100 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnEat;
101 ::ll::TypedStorage<4, 4, int> mDelayBeforeEating;
102 struct {
103 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mTargetBlocks;
104 ::ll::TypedStorage<8, 24, ::std::vector<::SharedTypes::v1_26_20::MaterialType>> mTargetMaterialsAboveBlock;
105 ::ll::TypedStorage<1, 1, bool> mAllowLayingFromBelow;
106 ::ll::TypedStorage<1, 1, bool> mUseDefaultAnimation;
107 ::ll::TypedStorage<4, 4, float> mLaySeconds;
108 ::ll::TypedStorage<8, 16, ::ItemDescriptor> mEggType;
109 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnLayEvent;
110 ::ll::TypedStorage<8, 32, ::std::string> mLayEggSound;
111 } mLayEggGoalData;
112 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnWorkArrivalEvent;
113 ::ll::TypedStorage<4, 4, float> mTargetDist;
114 ::ll::TypedStorage<4, 4, float> mSpeedModifier;
115 ::ll::TypedStorage<1, 1, ::SharedTypes::v1_26_20::MaterialType> mMaterialType;
116 ::ll::TypedStorage<4, 4, int> mSearchRange;
117 ::ll::TypedStorage<4, 4, int> mSearchHeight;
118 ::ll::TypedStorage<4, 4, int> mSearchCount;
119 ::ll::TypedStorage<4, 4, float> mGoalRadius;
120 struct {
121 ::ll::TypedStorage<4, 4, float> speedModifier;
122 ::ll::TypedStorage<4, 4, int> tickInterval;
123 ::ll::TypedStorage<4, 4, float> stayDuration;
124 ::ll::TypedStorage<8, 24, ::std::vector<::ActorDefinitionTrigger>> onReachTriggers;
125 ::ll::TypedStorage<8, 24, ::std::vector<::ActorDefinitionTrigger>> onStayCompletedTriggers;
126 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> targetDescriptors;
127 ::ll::TypedStorage<4, 12, ::Vec3> targetPositionOffset;
128 ::ll::TypedStorage<4, 4, float> chanceToStart;
129 ::ll::TypedStorage<1, 1, ::TargetSelectionMethod> targetSelectionMethod;
130 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> targetBlockFilter;
131 } mMoveToBlockGoalData;
132 ::ll::TypedStorage<4, 4, float> mWithin;
133 ::ll::TypedStorage<1, 1, bool> mIgnoreMobDamage;
134 ::ll::TypedStorage<1, 1, bool> mForceUse;
135 ::ll::TypedStorage<8, 32, ::std::string> mPanicSound;
136 ::ll::TypedStorage<8, 24, ::std::vector<::SharedTypes::Legacy::ActorDamageCause>> mDamageSources;
137 ::ll::TypedStorage<4, 4, float> mLookAhead;
138 ::ll::TypedStorage<4, 4, float> mCenteredGap;
139 ::ll::TypedStorage<4, 4, float> mMoveSpeed;
140 ::ll::TypedStorage<4, 4, int> mEntityCount;
141 ::ll::TypedStorage<4, 4, int> mXZDist;
142 ::ll::TypedStorage<4, 4, int> mYDist;
143 ::ll::TypedStorage<4, 4, float> mYOffset;
144 ::ll::TypedStorage<4, 4, int> mInterval;
145 ::ll::TypedStorage<1, 1, bool> mAvoidSurface;
146 ::ll::TypedStorage<4, 4, float> mCooldown;
147 ::ll::TypedStorage<1, 1, bool> mCanLandOnTrees;
148 ::ll::TypedStorage<4, 4, float> mRangedFOV;
149 ::ll::TypedStorage<4, 4, int> mAttackIntervalMin;
150 ::ll::TypedStorage<4, 4, int> mAttackIntervalMax;
151 ::ll::TypedStorage<4, 4, float> mAttackRadius;
152 ::ll::TypedStorage<4, 4, float> mAttackRadiusMin;
153 ::ll::TypedStorage<4, 4, float> mChargeChargedTrigger;
154 ::ll::TypedStorage<4, 4, float> mChargeShootTrigger;
155 ::ll::TypedStorage<4, 4, int> mBurstShots;
156 ::ll::TypedStorage<4, 4, float> mBurstInterval;
157 ::ll::TypedStorage<1, 1, bool> mRangedSetPersistent;
158 bool mMustSee : 1;
159 bool mMustReach : 1;
160 bool mCloseDoorAfter : 1;
161 bool mCanGetScared : 1;
162 bool mOnlyAtNight : 1;
163 bool mMustBeOnGround : 1;
164 bool mTrackTarget : 1;
165 bool mAlertSameType : 1;
166 bool mReselectTargets : 1;
167 ::ll::TypedStorage<1, 1, bool> mHurtOwner;
168 ::ll::TypedStorage<4, 4, int> mMustSeeForgetTicks;
169 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mItemList;
170 ::ll::TypedStorage<1, 1, bool> mCanTemptVertically;
171 ::ll::TypedStorage<1, 1, bool> mCanTemptWhileRidden;
172 ::ll::TypedStorage<8, 32, ::std::string> mTemptSound;
173 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnTemptStartEvent;
174 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnTemptEndEvent;
175 ::ll::TypedStorage<4, 4, int> mMaxToEat;
176 ::ll::TypedStorage<4, 4, int> mEatDelay;
177 ::ll::TypedStorage<4, 4, int> mFullDelay;
178 ::ll::TypedStorage<4, 4, int> mInitialEatDelay;
179 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mBlockDescriptors;
180 ::ll::TypedStorage<4, 4, float> mFloatHeightOffset;
181 ::ll::TypedStorage<1, 1, bool> mRandomReselect;
182 ::ll::TypedStorage<4, 8, ::FloatRange> mFloatDuration;
183 ::ll::TypedStorage<1, 1, bool> mUseHomePositionRestriction;
184 ::ll::TypedStorage<1, 1, bool> mFloatWanderHasMoveControlFlag;
185 ::ll::TypedStorage<4, 4, int> mSurfaceXZDist;
186 ::ll::TypedStorage<4, 4, int> mSurfaceYDist;
187 ::ll::TypedStorage<1, 1, bool> mAdditionalCollisionBuffer;
188 ::ll::TypedStorage<1, 1, bool> mNavigateAroundSurface;
189 ::ll::TypedStorage<1, 1, bool> mAllowNavigatingThroughLiquids;
190 ::ll::TypedStorage<4, 8, ::IntRange> mHoverHeight;
191 ::ll::TypedStorage<4, 4, float> mDuration;
192 ::ll::TypedStorage<4, 8, ::FloatRange> mRadiusRange;
193 ::ll::TypedStorage<4, 4, int> mRadiusChangeChance;
194 ::ll::TypedStorage<4, 8, ::FloatRange> mAboveTargetRange;
195 ::ll::TypedStorage<4, 8, ::FloatRange> mHeightOffsetRange;
196 ::ll::TypedStorage<4, 4, int> mHeightChangeChance;
197 ::ll::TypedStorage<8, 24, ::std::vector<::SummonSpellData>> mSummonSpellData;
198 ::ll::TypedStorage<4, 4, ::POIType> mPOIType;
199 ::ll::TypedStorage<4, 4, int> mGoalCooldown;
200 ::ll::TypedStorage<4, 4, int> mActiveTime;
201 ::ll::TypedStorage<4, 4, int> mRandomSoundIntervalMin;
202 ::ll::TypedStorage<4, 4, int> mRandomSoundIntervalMax;
203 ::ll::TypedStorage<1, 1, bool> mCanWorkInRain;
204 ::ll::TypedStorage<4, 4, int> mWorkInRainTolerance;
205 ::ll::TypedStorage<4, 4, float> mFollowDistance;
206 ::ll::TypedStorage<1, 1, bool> mAlwaysLookForLeader;
207 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mLeaderFilters;
208 ::ll::TypedStorage<4, 4, int> mSearchCooldown;
209 ::ll::TypedStorage<4, 4, float> mBlockDistance;
210 ::ll::TypedStorage<8, 24, ::std::vector<::SendEventData>> mSendEventData;
211 ::ll::TypedStorage<4, 4, int> mStartDelay;
212 ::ll::TypedStorage<4, 4, int> mMaxFailedAttempts;
213 ::ll::TypedStorage<1, 1, bool> mAvoidWater;
214 ::ll::TypedStorage<1, 1, bool> mPreferWater;
215 ::ll::TypedStorage<1, 1, bool> mTargetNeeded;
216 ::ll::TypedStorage<4, 4, float> mMountDistance;
217 ::ll::TypedStorage<8, 24, ::std::vector<::DrinkPotionData>> mDrinkPotionData;
218 ::ll::TypedStorage<4, 4, float> mDrinkSpeedModifier;
219 ::ll::TypedStorage<4, 4, float> mDropItemChance;
220 ::ll::TypedStorage<8, 32, ::std::string> mLootTable;
221 ::ll::TypedStorage<4, 4, float> mSnackingCooldown;
222 ::ll::TypedStorage<4, 4, float> mSnackingCooldownMin;
223 ::ll::TypedStorage<4, 4, float> mStopSnackingChance;
224 ::ll::TypedStorage<4, 4, float> mStopChance;
225 ::ll::TypedStorage<4, 4, float> mStartChance;
226 ::ll::TypedStorage<4, 4, float> mSittingTimeMin;
227 ::ll::TypedStorage<4, 4, float> mSittingCooldown;
228 ::ll::TypedStorage<8, 32, ::std::string> mSound;
229 ::ll::TypedStorage<8, 32, ::std::string> mPrepareSound;
230 ::ll::TypedStorage<4, 4, float> mPrepareTime;
231 ::ll::TypedStorage<8, 32, ::std::string> mAggroSound;
232 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnDefendEvent;
233 ::ll::TypedStorage<4, 4, float> mSleepYOffset;
234 ::ll::TypedStorage<4, 4, float> mSleepColliderHeight;
235 ::ll::TypedStorage<4, 4, float> mSleepColliderWidth;
236 ::ll::TypedStorage<1, 1, bool> mCanSleepWhileRiding;
237 ::ll::TypedStorage<1, 1, bool> mSinkWithPassengers;
238 ::ll::TypedStorage<4, 4, float> mChancePerTickToFloat;
239 ::ll::TypedStorage<4, 4, float> mTimeUnderwaterToDismountPassengers;
240 ::ll::TypedStorage<4, 4, float> mCooldownMax;
241 ::ll::TypedStorage<4, 4, float> mCooldownMin;
242 ::ll::TypedStorage<4, 4, float> mDetectMobDistance;
243 ::ll::TypedStorage<4, 4, float> mDetectMobHeight;
244 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mCanNapFilters;
245 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mWakeMobExceptionFilters;
246 ::ll::TypedStorage<4, 4, float> mInterestTime;
247 ::ll::TypedStorage<4, 4, float> mRemoveItemTime;
248 ::ll::TypedStorage<4, 4, float> mCarriedItemSwitchTime;
249 ::ll::TypedStorage<4, 4, float> mInterestCooldown;
250 ::ll::TypedStorage<4, 4, float> mCooldownTimeoutTime;
251 ::ll::TypedStorage<8, 176, ::ActorDefinitionIdentifier> mDesiredMingleType;
252 ::ll::TypedStorage<4, 4, float> mMingleDistance;
253 ::ll::TypedStorage<1, 1, bool> mPickupBasedOnChance;
254 ::ll::TypedStorage<1, 1, bool> mCanPickupAnyItem;
255 ::ll::TypedStorage<4, 4, int> mTimeoutAfterBeingAttacked;
256 ::ll::TypedStorage<1, 1, bool> mCanPickupToHandOrEquipment;
257 ::ll::TypedStorage<1, 1, bool> mPickupSameItemsAsInHand;
258 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mPickupItemsOnStartEvent;
259 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mPickupItemsOnEndEvent;
260 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mExcludedItemsList;
261 ::ll::TypedStorage<1, 1, bool> mSlimeSetPersistent;
262 ::ll::TypedStorage<8, 32, ::std::string> mAdmireItemSound;
263 ::ll::TypedStorage<4, 8, ::FloatRange> mSoundInterval;
264 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnAdmireItemStart;
265 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnAdmireItemStop;
266 ::ll::TypedStorage<4, 4, float> mLiquidYOffset;
267 ::ll::TypedStorage<4, 4, float> mRiseDelta;
268 ::ll::TypedStorage<4, 4, float> mSinkDelta;
269 // NOLINTEND
270
271#ifdef LL_PLAT_S
272public:
273 // prevent constructor by default
274 LegacyGoalDefinition& operator=(LegacyGoalDefinition const&);
275
276#else // LL_PLAT_C
277#endif
278public:
279 // member functions
280 // NOLINTBEGIN
281 MCAPI LegacyGoalDefinition();
282
283 MCAPI LegacyGoalDefinition(::LegacyGoalDefinition&&);
284
285 MCAPI LegacyGoalDefinition(::LegacyGoalDefinition const&);
286
287#ifdef LL_PLAT_C
288 MCAPI ::LegacyGoalDefinition& operator=(::LegacyGoalDefinition const&);
289#endif
290
291 MCAPI bool parse(::ConstDeserializeDataParams const& deserializeDataParams, int priority);
292
293 MCAPI ~LegacyGoalDefinition();
294 // NOLINTEND
295
296public:
297 // static functions
298 // NOLINTBEGIN
299 MCAPI static ::std::unique_ptr<::BaseGoal> createGoal(::Mob& mob, ::LegacyGoalDefinition const& def);
300
301 MCAPI static bool goalExists(::std::string const& name);
302 // NOLINTEND
303
304public:
305 // static variables
306 // NOLINTBEGIN
307 MCAPI static ::std::unordered_map<
308 ::std::string,
309 ::std::function<::std::unique_ptr<::BaseGoal>(::Mob&, ::LegacyGoalDefinition const&)>>&
310 mGoalMap();
311 // NOLINTEND
312
313public:
314 // constructor thunks
315 // NOLINTBEGIN
316 MCAPI void* $ctor();
317
318 MCAPI void* $ctor(::LegacyGoalDefinition&&);
319
320 MCAPI void* $ctor(::LegacyGoalDefinition const&);
321 // NOLINTEND
322
323public:
324 // destructor thunk
325 // NOLINTBEGIN
326 MCAPI void $dtor();
327 // NOLINTEND
328};
Definition BaseGoal.h:12
Definition Mob.h:55
Definition ConstDeserializeDataParams.h:13
Definition DrinkPotionData.h:8
Definition MobDescriptor.h:8
Definition SendEventData.h:14
Definition SummonSpellData.h:14