LeviLamina
Loading...
Searching...
No Matches
FallingBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/NewBlockID.h"
7#include "mc/deps/core/math/Vec3.h"
8#include "mc/world/actor/ActorInitializationMethod.h"
9#include "mc/world/actor/projectile/PredictableProjectile.h"
10
11// auto generated forward declare list
12// clang-format off
15class ActorHurtResult;
16class Block;
17class CompoundTag;
18class DataLoadHelper;
19class EntityContext;
20class ITickDelegate;
23// clang-format on
24
25class FallingBlockActor : public ::PredictableProjectile {
26public:
27 // FallingBlockActor inner types define
28 enum class State : int {
29 Falling = 0,
30 WaitRemoval = 1,
31 };
32
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<1, 1, bool> mCreative;
37 ::ll::TypedStorage<4, 4, ::FallingBlockActor::State> mState;
38 ::ll::TypedStorage<4, 4, int> mWaitTicks;
39 ::ll::TypedStorage<4, 4, int> mTime;
40 ::ll::TypedStorage<1, 1, bool> mCancelDrop;
41 ::ll::TypedStorage<1, 1, bool> mHurtEntities;
42 ::ll::TypedStorage<4, 4, int> mFallDamageMax;
43 ::ll::TypedStorage<4, 4, float> mFallDamageAmount;
44 ::ll::TypedStorage<4, 12, ::Vec3> mRenderOffset;
45 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CompoundTag>> mFallingBlockSerId;
46 ::ll::TypedStorage<2, 2, ::NewBlockID> mFallingBlockId;
47 ::ll::TypedStorage<2, 2, ushort> mFallingBlockData;
48 // NOLINTEND
49
50public:
51 // prevent constructor by default
52 FallingBlockActor();
53
54public:
55 // virtual functions
56 // NOLINTBEGIN
57 virtual void reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
58
59 virtual void normalTick() /*override*/;
60
61 virtual float getShadowRadius() const /*override*/;
62
63 virtual float causeFallDamageToActor(float distance, float multiplier, ::ActorDamageSource source) /*override*/;
64
65 virtual void teleportTo(
66 ::Vec3 const& pos,
67 bool shouldStopRiding,
68 int cause,
69 int sourceEntityType,
70 bool keepVelocity
71 ) /*override*/;
72
73 virtual bool canChangeDimensionsUsingPortal() const /*override*/;
74
75 virtual void onSynchedDataUpdate(int dataId) /*override*/;
76
77 virtual ::ActorHurtResult _hurt(::ActorDamageSource const&, float, bool, bool) /*override*/;
78
79 virtual void addAdditionalSaveData(::CompoundTag& tag) const /*override*/;
80
81 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
82
83 virtual ~FallingBlockActor() /*override*/ = default;
84 // NOLINTEND
85
86public:
87 // member functions
88 // NOLINTBEGIN
89 MCAPI FallingBlockActor(
90 ::ActorDefinitionGroup* definitions,
91 ::ActorDefinitionIdentifier const& definitionName,
92 ::EntityContext& entityContext
93 );
94
95 MCAPI void breakBlock();
96
97 MCAPI void doNormalTick(::ITickDelegate& tickDelegate);
98
99 MCAPI ::Block const& getFallingBlock() const;
100
101 MCAPI void setFallingBlock(::Block const& block, bool creative);
102 // NOLINTEND
103
104public:
105 // constructor thunks
106 // NOLINTBEGIN
107 MCAPI void* $ctor(
108 ::ActorDefinitionGroup* definitions,
109 ::ActorDefinitionIdentifier const& definitionName,
110 ::EntityContext& entityContext
111 );
112 // NOLINTEND
113
114public:
115 // virtual function thunks
116 // NOLINTBEGIN
117 MCAPI void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
118
119 MCAPI void $normalTick();
120
121 MCFOLD float $getShadowRadius() const;
122
123 MCAPI float $causeFallDamageToActor(float distance, float multiplier, ::ActorDamageSource source);
124
125 MCFOLD void
126 $teleportTo(::Vec3 const& pos, bool shouldStopRiding, int cause, int sourceEntityType, bool keepVelocity);
127
128 MCAPI bool $canChangeDimensionsUsingPortal() const;
129
130 MCAPI void $onSynchedDataUpdate(int dataId);
131
132 MCAPI ::ActorHurtResult $_hurt(::ActorDamageSource const&, float, bool, bool);
133
134 MCAPI void $addAdditionalSaveData(::CompoundTag& tag) const;
135
136 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
137
138
139 // NOLINTEND
140
141public:
142 // vftables
143 // NOLINTBEGIN
144 MCAPI static void** $vftable();
145 // NOLINTEND
146};
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:36
Definition ActorHurtResult.h:5
Definition Block.h:43
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition EntityContext.h:16
Definition ITickDelegate.h:13
Definition PredictableProjectile.h:8
Definition Vec3.h:10
Definition ActorDefinitionIdentifier.h:15
Definition VariantParameterList.h:13