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
33MCNAPI_C ::CameraAimAssistSystemUtil::BlockHitDetectResult blockHitDetect(
34 ::Vec3 const& start,
35 ::Vec3 const& end,
36 ::IConstBlockSource const& region,
37 int maxDist,
38 bool useSelectionBox,
39 bool targetingLiquid,
40 ::std::function<bool(::Block const&)> const& isAcceptedBlock,
41 ::std::function<bool(::BlockType const&)> const& isBlockExcluded,
42 ::std::function<int(::BlockType const&)> const& getBlockPriority
43);
44
45MCNAPI void clearAimAssistForServerPlayer(::ServerPlayer& player);
46
47MCNAPI_C ::Frustum createFrustumForCachedFrustumComponent(
48 ::Vec3 const& start,
49 ::Vec3 const& direction,
50 ::Vec3 const& unitLeft,
51 float leftLength,
52 ::Vec3 const& unitUp,
53 float upLength,
54 ::Vec3 const& farCenter
55);
56
57MCNAPI_C ::CameraAimAssistSystemUtil::BlockHitDetectResult firstBlockHitDetect(
58 ::IConstBlockSource const& region,
59 ::BlockPos const& currentBlockPos,
60 ::Vec3 const& start,
61 ::Vec3 const& end,
62 ::Vec3 const&,
63 ::std::function<bool(::Block const&)> const& isAcceptedBlock,
64 ::std::function<bool(::BlockType const&)> const& isBlockExcluded,
65 ::std::function<int(::BlockType const&)> const& getBlockPriority
66);
67
68MCNAPI ::std::optional<::CameraAimAssistPacketPayload::TargetMode>
69getPacketTargetMode(::CameraAimAssist::TargetMode targetMode);
70
71MCNAPI ::Bedrock::Result<
72 void,
73 ::std::variant<
74 ::CameraAimAssistErrorType::UnknownPresetId,
75 ::CameraAimAssistErrorType::UnknownCategoryId,
76 ::CameraAimAssistErrorType::MissingDependencies>>
77setAimAssistForServerPlayer(
78 ::ServerPlayer& player,
79 ::HashedString const& presetId,
80 ::CameraAimAssist::TargetMode targetMode,
81 ::Vec2 const& viewAngle,
82 float distance,
83 bool showDebugRender
84);
85
86MCNAPI_C ::Bedrock::Result<
87 void,
88 ::std::variant<
89 ::CameraAimAssistErrorType::UnknownPresetId,
90 ::CameraAimAssistErrorType::UnknownCategoryId,
91 ::CameraAimAssistErrorType::MissingDependencies>>
92setAimAssistFromClient(
93 ::Player& player,
94 ::SharedTypes::v1_21_90::CameraPreset const& cameraPreset,
95 bool allowAimAssist
96);
97
98MCNAPI_C bool shouldRotatePlayerOnProjectile(::std::string_view cameraMode, ::ControlScheme::Scheme controlScheme);
99
100MCNAPI_C bool stepAndUpdateCurrentBlockPos(
101 ::Vec3& currentPos,
102 ::BlockPos& currentBlockPos,
103 ::Vec3 const& endPos,
104 ::BlockPos const& endBlockPos
105);
106// NOLINTEND
107
108} // 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:125
Definition ServerPlayer.h:67
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:23