LeviLamina
Loading...
Searching...
No Matches
ClientInputHandler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/input/InputBindingMode.h"
8#include "mc/deps/input/InputMode.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
16class Config;
17class IClientInstance;
18class InputHandler;
19class ItemStack;
20class ScreenContext;
25namespace Input::Debug { class ISplitscreenRedirect; }
26// clang-format on
27
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IClientInstance>> mClient;
33 ::ll::TypedStorage<8, 8, ::InputHandler&> mInputHandler;
34 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Input::Debug::ISplitscreenRedirect>>
35 mDebugSplitscreenInputRedirect;
36 ::ll::TypedStorage<4, 4, ::InputBindingMode> mInputBindingMode;
37 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientBindingFactory>> mBindingFactory;
38 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientInputMappingFactory>> mMappingFactory;
39 ::ll::TypedStorage<8, 32, ::std::string> mExpectedInGameInputMode;
40 ::ll::TypedStorage<1, 1, bool> mIsFlying;
41 ::ll::TypedStorage<1, 1, bool> mIsSneaking;
42 ::ll::TypedStorage<1, 1, bool> mIsSprinting;
43 ::ll::TypedStorage<1, 1, bool> mIsSwimming;
44 ::ll::TypedStorage<1, 1, bool> mIsInWater;
45 ::ll::TypedStorage<1, 1, bool> mIsExpediateEmoteActive;
46 ::ll::TypedStorage<1, 1, bool> mIsInAscendableBlock;
47 ::ll::TypedStorage<1, 1, bool> mIsOnDescendableBlock;
48 ::ll::TypedStorage<1, 1, bool> mIsCreativeMode;
49 ::ll::TypedStorage<1, 1, bool> mIsSpectatorMode;
50 ::ll::TypedStorage<1, 1, bool> mInteractActive;
51 ::ll::TypedStorage<1, 1, bool> mHasMobEffects;
52 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientInputHandlerProxy>> mProxy;
53 // NOLINTEND
54
55public:
56 // prevent constructor by default
57 ClientInputHandler& operator=(ClientInputHandler const&);
58 ClientInputHandler(ClientInputHandler const&);
59 ClientInputHandler();
60
61public:
62 // member functions
63 // NOLINTBEGIN
64 MCAPI ::Actor* _interactWithEntity() const;
65
66 MCAPI ::std::string _interactWithImmersiveReader() const;
67
68 MCAPI ::ItemStack const& _interactWithItem() const;
69
70 MCAPI bool _shouldUseGameInputMapping() const;
71
72 MCAPI bool canInteract() const;
73
74 MCAPI bool canPaddle() const;
75
76 MCAPI ::std::string getBoatExitText() const;
77
78 MCAPI ::InputMode getCurrentInputMode() const;
79
80 MCAPI void getCursorPos(float& xCursor, float& yCursor) const;
81
82 MCAPI ::std::string getInteractText() const;
83
84 MCAPI bool getSplitscreenJoinPromptVisible() const;
85
86 MCAPI bool isBlockSelectToggled() const;
87
88 MCAPI bool isTouchGameplayAllowed() const;
89
90 MCAPI void onConfigChanged(::Config const& c);
91
92 MCAPI void popInputMapping(bool inGame);
93
94 MCAPI void pushInputMapping(bool inGame);
95
96 MCAPI void releaseButtonsAndSticks();
97
98 MCAPI void render(::ScreenContext& screenContext);
99
100 MCAPI void resetPlayerState();
101
102 MCAPI void setBlockSelectToggle(bool value);
103
104 MCAPI void setDisableInput(bool disable);
105
106 MCAPI void setSuspendDirectionalInput(bool suspendDirectionalInput);
107
108 MCAPI void setSuspendInput(bool suspendInput);
109
110 MCAPI bool showBoatExit() const;
111
112 MCAPI void updateInputMapping();
113
114 MCAPI bool updateInputMode(::std::string const& mode);
115
116 MCAPI void updatePlayerState(
117 ::gsl::not_null<::IClientInstance const*> client,
118 ::MovementAbilitiesComponent const& abilities,
119 ::MobEffectsComponent const& mobEffects,
120 ::ActorDataFlagComponent const& synchedActorData,
121 ::MoveInputComponent& moveInput,
122 bool isRiding,
123 bool isInWater
124 );
125
126 MCAPI bool useFreeformPickDirection() const;
127
128 MCAPI ~ClientInputHandler();
129 // NOLINTEND
130
131public:
132 // destructor thunk
133 // NOLINTBEGIN
134 MCAPI void $dtor();
135 // NOLINTEND
136};
Definition Actor.h:114
Definition ClientBindingFactory.h:5
Definition ClientInputHandlerProxy.h:5
Definition ClientInputHandler.h:5
Definition ClientInputMappingFactory.h:5
Definition Config.h:5
Definition IClientInstance.h:5
Definition InputHandler.h:5
Definition ISplitscreenRedirect.h:7
Definition ItemStack.h:24
Definition ScreenContext.h:5
Definition ActorDataFlagComponent.h:9
Definition MobEffectsComponent.h:8
Definition MoveInputComponent.h:11
Definition MovementAbilitiesComponent.h:5