LeviLamina
Loading...
Searching...
No Matches
ActorMobilityUtils.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/optional_ref.h"
7#include "mc/deps/ecs/Optional.h"
8#include "mc/deps/ecs/ViewT.h"
9#include "mc/deps/ecs/strict/EntityModifier.h"
10#include "mc/deps/ecs/strict/Exclude.h"
11#include "mc/deps/ecs/strict/Include.h"
12#include "mc/deps/shared_types/v1_26_20/block/MaterialType.h"
13
14// auto generated forward declare list
15// clang-format off
16class AABB;
17class EntityContext;
23class Vec3;
38struct MobFlagComponent;
40struct MobJumpComponent;
45struct OffsetsComponent;
46struct OnFireComponent;
50struct PlayerComponent;
55struct SubBBsComponent;
57struct VehicleComponent;
60// clang-format on
61
62namespace ActorMobilityUtils {
63// functions
64// NOLINTBEGIN
65MCAPI bool canActivateElytra(
66 ::MoveInputComponent const& moveInputComponent,
67 ::VanillaClientGameplayComponent const& vanillaClientGameplayComponent,
68 bool isGliding,
69 bool isFlying
70);
71
72MCAPI bool canDash(::ActorDataFlagComponent const& actorData);
73
74MCAPI bool canJump(
75 ::ActorDataFlagComponent const& actorData,
76 ::IConstBlockSource const& region,
77 ::StateVectorComponent const& stateVector,
78 ::AABBShapeComponent const& aabbShape,
79 ::GetCollisionShapeInterface const& collisionShape
80);
81
82MCAPI bool canPowerJump(::ActorDataFlagComponent const& actorData, bool hasJumpStrength, bool isMob);
83
84MCAPI void endJump(
85 ::StrictEntityContext const& context,
86 ::StateVectorComponent const& stateVectorComponent,
87 ::ActorDataJumpDurationComponent& actorDataJumpDurationComponent,
88 ::ActorDataDirtyFlagsComponent& actorDataDirtyFlags,
89 ::MobJumpComponent& mobJumpComponent,
90 ::VehicleComponent const* vehicleComponent,
91 ::ViewT<::StrictEntityContext, ::Include<::ParrotFlagComponent>, ::PassengerComponent const> parrotPassengers,
92 ::EntityModifier<::ExitFromPassengerFlagComponent, ::StopRidingRequestComponent, ::MobIsJumpingFlagComponent>&
93 modifier
94);
95
96MCAPI float getBrightness(
97 ::StrictEntityContext const& context,
98 float alpha,
99 ::IConstBlockSource const& region,
100 ::AABBShapeComponent const& aabbShapeComponent,
101 ::OffsetsComponent const& offsetsComponent,
102 ::StateVectorComponent const& stateVectorComponent,
103 ::ViewT<::StrictEntityContext, ::Include<::BlazeFlagComponent>> blazeView,
104 ::ViewT<::StrictEntityContext, ::Include<::LavaSlimeFlagComponent>> lavaSlimeView
105);
106
107MCFOLD float getJumpEffectAmplifierValue(::std::vector<::MobEffectInstance> const& mobEffects);
108
109MCFOLD float getJumpEffectAmplifierValue(::MobEffectsComponent const& mobEffectsComponent);
110
111MCAPI float getJumpPower(::JumpControlComponent const* jumpControlComponent, bool isSquid);
112
113MCAPI ::Vec3 getPosFromAABB(::AABB const& aabb, float heightOffset);
114
115MCAPI float getSpeed(
116 ::MovementAttributesComponent const& movementAttributesComponent,
117 ::MovementSpeedComponent const& movementSpeedComponent,
118 bool isPlayer
119);
120
121MCAPI bool hasJumpActionOverrideForVehicle(
122 ::ActorDataFlagComponent const& vehicleActorFlag,
123 ::MovementAttributesComponent const& vehicleAttributes,
124 bool isMob
125);
126
127MCAPI bool isGliding(::ActorDataFlagComponent const& actorData);
128
129MCAPI bool isImmobile(
130 ::StrictEntityContext const& context,
131 ::ViewT<::StrictEntityContext, ::ActorDataFlagComponent const, ::Optional<::ActorIsImmobileFlagComponent const>>*
132 actorView,
133 ::ViewT<
134 ::StrictEntityContext,
135 ::Include<::MobFlagComponent>,
136 ::MovementAttributesComponent const,
137 ::Optional<::ActorIsKnockedBackOnDeathFlagComponent const>,
138 ::Optional<::MovedOnSpawnComponent const>>* mobView,
139 ::ViewT<
140 ::StrictEntityContext,
141 ::ActorDataFlagComponent const,
142 ::Optional<::VehicleInputIntentComponent const>,
143 ::Include<::OnGroundFlagComponent, ::HorseFlagComponent>,
144 ::Exclude<::MobAllowStandSlidingFlagComponent, ::MobIsJumpingFlagComponent>>* horseView,
145 ::ViewT<::StrictEntityContext, ::Include<::HorseFlagComponent>>* onlyHorseView,
146 ::ViewT<::StrictEntityContext, ::PlayerIsSleepingFlagComponent const, ::PlayerComponent const>* playerView
147);
148
149MCAPI bool
150isInLava(::IConstBlockSource const& region, ::AABBShapeComponent const& aabb, ::SubBBsComponent const& subBBs);
151
152MCAPI bool isOnFire(
153 ::ActorDataFlagComponent const& actorDataFlagComponent,
154 ::OnFireComponent const* onFireComponent,
155 ::LavaSlimeFlagComponent const* lavaSlimeFlagComponent,
156 ::ShulkerBulletFlagComponent const* shulkerBulletFlagComponent,
157 ::WitherSkullFlagComponent const* witherSkullFlagComponent,
158 ::BlazeFlagComponent const* blazeFlagComponent
159);
160
161MCAPI bool isSprinting(::ActorDataFlagComponent const& actorData);
162
163MCAPI bool isSwimming(::ActorDataFlagComponent const& actorData);
164
165MCAPI bool isUnderLiquid(
166 ::Vec3 const& actorPos,
167 ::Vec3 const& actorHeadPos,
168 ::IConstBlockSource const& region,
169 ::SharedTypes::v1_26_20::MaterialType blockType
170);
171
172MCFOLD bool isWASDFreeCameraControlled(::ActorDataFlagComponent const& actorData);
173
174MCAPI void moveBBs(::Vec3 const& pos, ::SubBBsComponent& subBBs);
175
176MCAPI void moveBBs(::Vec3 const& pos, ::AABBShapeComponent& aabb, ::SubBBsComponent& subBBs);
177
178MCAPI bool onHoverableBlock(::IConstBlockSource const& region, ::Vec3 const& pos, ::AABB const& aabb);
179
180MCAPI void setStanding(
181 ::ActorDataFlagComponent& synchedActorData,
182 ::optional_ref<::ActorDataHorseFlagComponent> actorDataHorseFlag,
183 ::ActorDataDirtyFlagsComponent& actorDataDirtyFlags,
184 bool value,
185 ::HorseStandCounterComponent* horseStandCounterComponent,
186 bool isServer
187);
188
189MCAPI bool shouldApplyLava(::IConstBlockSource const& region, ::EntityContext const& entity);
190
191MCAPI bool shouldApplyLava(
192 ::IConstBlockSource const& region,
193 ::AABBShapeComponent const& aabb,
194 ::SubBBsComponent const& subBBs,
195 bool isImmuneToLava
196);
197
198MCAPI void startSpinAttack(::EntityContext& entity, int riptideLevel);
199// NOLINTEND
200
201} // namespace ActorMobilityUtils
Definition AABB.h:18
Definition EntityContext.h:17
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition JumpControlComponent.h:17
Definition MobEffectInstance.h:20
Definition StrictEntityContext.h:14
Definition Vec3.h:10
Definition AABBShapeComponent.h:9
Definition ActorDataDirtyFlagsComponent.h:5
Definition ActorDataFlagComponent.h:10
Definition ActorDataHorseFlagComponent.h:8
Definition ActorDataJumpDurationComponent.h:8
Definition ActorIsImmobileFlagComponent.h:5
Definition ActorIsKnockedBackOnDeathFlagComponent.h:5
Definition BlazeFlagComponent.h:5
Definition ExitFromPassengerFlagComponent.h:5
Definition HorseFlagComponent.h:5
Definition HorseStandCounterComponent.h:5
Definition LavaSlimeFlagComponent.h:5
Definition MobAllowStandSlidingFlagComponent.h:5
Definition MobEffectsComponent.h:8
Definition MobFlagComponent.h:5
Definition MobIsJumpingFlagComponent.h:5
Definition MobJumpComponent.h:8
Definition MoveInputComponent.h:11
Definition MovedOnSpawnComponent.h:5
Definition MovementAttributesComponent.h:5
Definition MovementSpeedComponent.h:8
Definition OffsetsComponent.h:8
Definition OnFireComponent.h:11
Definition OnGroundFlagComponent.h:5
Definition ParrotFlagComponent.h:5
Definition PassengerComponent.h:8
Definition PlayerComponent.h:5
Definition PlayerIsSleepingFlagComponent.h:5
Definition ShulkerBulletFlagComponent.h:5
Definition StateVectorComponent.h:8
Definition StopRidingRequestComponent.h:5
Definition SubBBsComponent.h:10
Definition VanillaClientGameplayComponent.h:8
Definition VehicleComponent.h:10
Definition VehicleInputIntentComponent.h:11
Definition WitherSkullFlagComponent.h:5