LeviLamina
Loading...
Searching...
No Matches
ItemActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/world/item/ItemStack.h"
5
6// auto generated inclusion list
7#include "mc/world/actor/Actor.h"
8#include "mc/world/actor/ActorEvent.h"
9#include "mc/world/actor/ActorInitializationMethod.h"
10#include "mc/world/item/ItemStack.h"
11
12// auto generated forward declare list
13// clang-format off
16class BlockSource;
17class CompoundTag;
18class DataLoadHelper;
19class EntityContext;
20class ListTag;
21class Packet;
22class Player;
23class Vec3;
25struct ActorUniqueID;
27// clang-format on
28
29class ItemActor : public ::Actor {
30protected:
31 // ItemActor inner types declare
32 // clang-format off
34 // clang-format on
35
36 // ItemActor inner types define
38 public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<1, 1, bool> mUseAdjustments;
42 ::ll::TypedStorage<4, 4, float> mFirstRenderedYaw;
43 // NOLINTEND
44 };
45
46public:
47 // member variables
48 // NOLINTBEGIN
49 ::ll::TypedStorage<8, 152, ::ItemStack> mItem;
50 ::ll::TypedStorage<4, 4, int> mAge;
51 ::ll::TypedStorage<4, 4, int> mPickupDelay;
52 ::ll::TypedStorage<4, 4, int> mThrowTime;
53 ::ll::TypedStorage<4, 4, float> mBobOffs;
54 ::ll::TypedStorage<4, 4, int> mHealth;
55 ::ll::TypedStorage<4, 4, int> mLifeTime;
56 ::ll::TypedStorage<1, 1, bool> mIsInItemFrame;
57 ::ll::TypedStorage<1, 1, bool> mIsFromFishing;
58 ::ll::TypedStorage<4, 12, ::std::optional<::ItemActor::ItemRenderAdjustments>> mRenderAdjustments;
59 // NOLINTEND
60
61public:
62 LLNDAPI ItemStack& item();
63 LLNDAPI ItemStack const& item() const;
64 LLNDAPI int& age();
65 LLNDAPI int const& age() const;
66 LLNDAPI int& pickupDelay();
67 LLNDAPI int const& pickupDelay() const;
68 LLNDAPI int& throwTime();
69 LLNDAPI int const& throwTime() const;
70 LLNDAPI float& bobOffs();
71 LLNDAPI float const& bobOffs() const;
72 LLNDAPI int& health();
73 LLNDAPI int const& health() const;
74 LLNDAPI int& lifeTime();
75 LLNDAPI int const& lifeTime() const;
76 LLNDAPI bool& isInItemFrame();
77 LLNDAPI bool const& isInItemFrame() const;
78 LLNDAPI bool& isFromFishing();
79 LLNDAPI bool const& isFromFishing() const;
80
81public:
82 // virtual functions
83 // NOLINTBEGIN
84 virtual void reloadHardcoded(::ActorInitializationMethod, ::VariantParameterList const&) /*override*/;
85
86 virtual ~ItemActor() /*override*/ = default;
87
88 virtual void playerTouch(::Player& player) /*override*/;
89
90 virtual ::std::unique_ptr<::Packet> tryCreateAddActorPacket() /*override*/;
91
92 virtual ::ActorUniqueID getSourceUniqueID() const /*override*/;
93
94 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const /*override*/;
95
96 virtual bool canSynchronizeNewEntity() const /*override*/;
97
98 virtual void handleEntityEvent(::ActorEvent eventId, int data) /*override*/;
99
100 virtual bool isFireImmune() const /*override*/;
101
102 virtual bool _hurt(::ActorDamageSource const&, float damage, bool, bool) /*override*/;
103
104 virtual void addAdditionalSaveData(::CompoundTag& entityTag) const /*override*/;
105
106 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
107 // NOLINTEND
108
109public:
110 // member functions
111 // NOLINTBEGIN
112 MCAPI ItemActor(
113 ::ActorDefinitionGroup* definitions,
114 ::ActorDefinitionIdentifier const& definitionName,
115 ::EntityContext& entityContext
116 );
117
118 MCAPI void _addComponents();
119
120 MCAPI void _dropContents();
121
122 MCAPI void _dropItemList(::ListTag* itemList);
123
124 MCAPI bool _merge(::ItemActor* target);
125
126 MCAPI void _mergeWithNeighbours();
127
128 MCAPI void _validateItem();
129
130 MCAPI_C void clientInitialize(
131 ::BlockSource& region,
132 ::Vec3 const& pos,
133 ::ItemStack const& item,
134 int throwTime,
135 bool isInItemFrame,
136 bool isFromFishing
137 );
138
139 MCAPI void postNormalTick();
140 // NOLINTEND
141
142public:
143 // constructor thunks
144 // NOLINTBEGIN
145 MCAPI void* $ctor(
146 ::ActorDefinitionGroup* definitions,
147 ::ActorDefinitionIdentifier const& definitionName,
148 ::EntityContext& entityContext
149 );
150 // NOLINTEND
151
152public:
153 // virtual function thunks
154 // NOLINTBEGIN
155 MCAPI void $reloadHardcoded(::ActorInitializationMethod, ::VariantParameterList const&);
156
157 MCAPI void $playerTouch(::Player& player);
158
159 MCAPI ::std::unique_ptr<::Packet> $tryCreateAddActorPacket();
160
161 MCFOLD ::ActorUniqueID $getSourceUniqueID() const;
162
163 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
164
165 MCFOLD bool $canSynchronizeNewEntity() const;
166
167 MCAPI void $handleEntityEvent(::ActorEvent eventId, int data);
168
169 MCAPI bool $isFireImmune() const;
170
171 MCAPI bool $_hurt(::ActorDamageSource const&, float damage, bool, bool);
172
173 MCAPI void $addAdditionalSaveData(::CompoundTag& entityTag) const;
174
175 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
176
177
178 // NOLINTEND
179
180public:
181 // vftables
182 // NOLINTBEGIN
183 MCAPI static void** $vftable();
184 // NOLINTEND
185};
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:35
Definition BlockSource.h:68
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition EntityContext.h:16
Definition ItemStack.h:26
Definition ListTag.h:20
Definition Packet.h:28
Definition Player.h:125
Definition Vec3.h:10
STL namespace.
Definition ActorDefinitionIdentifier.h:15
Definition ActorUniqueID.h:5
Definition ItemActor.h:37
Definition VariantParameterList.h:13