LeviLamina
Loading...
Searching...
No Matches
RandomSwimUtility.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class BlockPos;
8class BlockSource;
9class Mob;
10class Vec3;
11struct Tick;
12namespace RandomSwimUtility { struct SwimHeightBounds; }
13// clang-format on
14
15namespace RandomSwimUtility {
16// functions
17// NOLINTBEGIN
18MCNAPI void beginRandomSwim(
19 ::Mob& mob,
20 ::Vec3& randomSwimTarget,
21 ::Vec3& randomSwimLastPosition,
22 ::Tick& randomSwimNoProgressTicks,
23 int searchRadius,
24 bool avoidSurface,
25 float yawPerTick
26);
27
28MCNAPI float computeBaseUnderwaterStepPerTick(::Mob const& mob, float defaultStepPerTick);
29
30MCNAPI ::RandomSwimUtility::SwimHeightBounds
31computeSwimHeightBounds(::BlockSource const& region, float mobPosY, ::BlockPos const& anchorPosIn, int yRangeLimit);
32
33MCNAPI void randomSwimTick(
34 ::Mob& mob,
35 ::Vec3& randomSwimTarget,
36 ::Vec3& randomSwimLastPosition,
37 ::Tick& randomSwimNoProgressTicks,
38 float baseStepPerTick,
39 float minStepLength,
40 float yawPerTick,
41 int searchRadius,
42 bool avoidSurface
43);
44
45MCNAPI ::std::optional<::Vec3>
46trySelectRandomSwimTarget(::Mob& mob, int searchRadius, bool avoidSurface, int maxAttempts);
47
48MCNAPI bool turnBodyYawTowards(::Mob& mob, ::Vec3 const& toTarget, float maxDeltaDegrees);
49
50MCNAPI bool
51validateSwimTarget(::BlockSource const& region, ::Mob const& mob, ::Vec3 const& targetWorldPos, bool avoidSurface);
52// NOLINTEND
53
54} // namespace RandomSwimUtility
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Mob.h:50
Definition Vec3.h:10
Definition SwimHeightBounds.h:7
Definition Tick.h:5