LeviLamina
Loading...
Searching...
No Matches
CameraAimAssistSystemUtil.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/network/packet/CameraAimAssistPacketPayload.h"
7#include "mc/platform/Result.h"
8#include "mc/world/level/camera/aimassist/camera_aim_assist/TargetMode.h"
9#include "mc/world/level/camera/controlscheme/Scheme.h"
10
11// auto generated forward declare list
12// clang-format off
13class Block;
14class BlockPos;
15class BlockType;
16class Frustum;
17class HashedString;
19class Player;
20class ServerPlayer;
21class Vec2;
22class Vec3;
23namespace CameraAimAssistErrorType { struct MissingDependencies; }
24namespace CameraAimAssistErrorType { struct UnknownCategoryId; }
25namespace CameraAimAssistErrorType { struct UnknownPresetId; }
26namespace CameraAimAssistSystemUtil { struct BlockHitDetectResult; }
27namespace SharedTypes::v1_21_90 { struct CameraPreset; }
28// clang-format on
29
30namespace CameraAimAssistSystemUtil {
31// functions
32// NOLINTBEGIN
33#ifdef LL_PLAT_C
34MCNAPI ::CameraAimAssistSystemUtil::BlockHitDetectResult blockHitDetect(
35 ::Vec3 const& start,
36 ::Vec3 const& end,
37 ::IConstBlockSource const& region,
38 int maxDist,
39 bool useSelectionBox,
40 bool targetingLiquid,
41 ::std::function<bool(::Block const&)> const& isAcceptedBlock,
42 ::std::function<bool(::BlockType const&)> const& isBlockExcluded,
43 ::std::function<int(::BlockType const&)> const& getBlockPriority
44);
45#endif
46
47MCNAPI void clearAimAssistForServerPlayer(::ServerPlayer& player);
48
49#ifdef LL_PLAT_C
50MCNAPI ::Frustum createFrustumForCachedFrustumComponent(
51 ::Vec3 const& start,
52 ::Vec3 const& direction,
53 ::Vec3 const& unitLeft,
54 float leftLength,
55 ::Vec3 const& unitUp,
56 float upLength,
57 ::Vec3 const& farCenter
58);
59
60MCNAPI ::CameraAimAssistSystemUtil::BlockHitDetectResult firstBlockHitDetect(
61 ::IConstBlockSource const& region,
62 ::BlockPos const& currentBlockPos,
63 ::Vec3 const& start,
64 ::Vec3 const& end,
65 ::Vec3 const&,
66 ::std::function<bool(::Block const&)> const& isAcceptedBlock,
67 ::std::function<bool(::BlockType const&)> const& isBlockExcluded,
68 ::std::function<int(::BlockType const&)> const& getBlockPriority
69);
70#endif
71
72MCNAPI ::std::optional<::CameraAimAssistPacketPayload::TargetMode>
73getPacketTargetMode(::CameraAimAssist::TargetMode targetMode);
74
75MCNAPI ::Bedrock::Result<
76 void,
77 ::std::variant<
78 ::CameraAimAssistErrorType::UnknownPresetId,
79 ::CameraAimAssistErrorType::UnknownCategoryId,
80 ::CameraAimAssistErrorType::MissingDependencies>>
81setAimAssistForServerPlayer(
82 ::ServerPlayer& player,
83 ::HashedString const& presetId,
84 ::CameraAimAssist::TargetMode targetMode,
85 ::Vec2 const& viewAngle,
86 float distance,
87 bool showDebugRender
88);
89
90#ifdef LL_PLAT_C
91MCNAPI ::Bedrock::Result<
92 void,
93 ::std::variant<
94 ::CameraAimAssistErrorType::UnknownPresetId,
95 ::CameraAimAssistErrorType::UnknownCategoryId,
96 ::CameraAimAssistErrorType::MissingDependencies>>
97setAimAssistFromClient(
98 ::Player& player,
99 ::SharedTypes::v1_21_90::CameraPreset const& cameraPreset,
100 bool allowAimAssist
101);
102
103MCNAPI bool shouldRotatePlayerOnProjectile(::std::string_view cameraMode, ::ControlScheme::Scheme controlScheme);
104
105MCNAPI bool stepAndUpdateCurrentBlockPos(
106 ::Vec3& currentPos,
107 ::BlockPos& currentBlockPos,
108 ::Vec3 const& endPos,
109 ::BlockPos const& endBlockPos
110);
111#endif
112// NOLINTEND
113
114} // namespace CameraAimAssistSystemUtil
Definition BlockPos.h:19
Definition BlockType.h:84
Definition Block.h:43
Definition Frustum.h:5
Definition HashedString.h:5
Definition IConstBlockSource.h:25
Definition Player.h:129
Definition ServerPlayer.h:68
Definition Vec2.h:5
Definition Vec3.h:10
Definition MissingDependencies.h:7
Definition UnknownCategoryId.h:7
Definition UnknownPresetId.h:7
Definition BlockHitDetectResult.h:7
Definition CameraPreset.h:20