3#include "mc/_HeaderOutputPredefine.h"
15namespace RandomSwimUtility {
18MCNAPI
void beginRandomSwim(
20 ::Vec3& randomSwimTarget,
21 ::Vec3& randomSwimLastPosition,
22 ::Tick& randomSwimNoProgressTicks,
28MCNAPI
float computeBaseUnderwaterStepPerTick(::Mob
const& mob,
float defaultStepPerTick);
30MCNAPI ::RandomSwimUtility::SwimHeightBounds
31computeSwimHeightBounds(::BlockSource
const& region,
float mobPosY, ::BlockPos
const& anchorPosIn,
int yRangeLimit);
33MCNAPI
void randomSwimTick(
35 ::Vec3& randomSwimTarget,
36 ::Vec3& randomSwimLastPosition,
37 ::Tick& randomSwimNoProgressTicks,
38 float baseStepPerTick,
45MCNAPI ::std::optional<::Vec3>
46trySelectRandomSwimTarget(::Mob& mob,
int searchRadius,
bool avoidSurface,
int maxAttempts);
48MCNAPI
bool turnBodyYawTowards(::Mob& mob, ::Vec3
const& toTarget,
float maxDeltaDegrees);
51validateSwimTarget(::BlockSource
const& region, ::Mob
const& mob, ::Vec3
const& targetWorldPos,
bool avoidSurface);
Definition BlockSource.h:68
Definition SwimHeightBounds.h:7