LeviLamina
Loading...
Searching...
No Matches
ExperienceOrb.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/legacy/ActorUniqueID.h"
7#include "mc/world/actor/Actor.h"
8#include "mc/world/actor/ActorInitializationMethod.h"
9
10// auto generated forward declare list
11// clang-format off
14class ActorHurtResult;
15class BlockSource;
16class CompoundTag;
17class DataLoadHelper;
18class EntityContext;
19class Level;
20class Player;
21class Vec3;
24// clang-format on
25
26class ExperienceOrb : public ::Actor {
27public:
28 // ExperienceOrb inner types define
29 enum class DropType : uchar {
30 NoType = 0,
31 FromBlock = 1,
32 FromMob = 2,
33 FromPlayer = 3,
34 };
35
36public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mFollowingPlayer;
40 ::ll::TypedStorage<4, 4, int> mFollowingTime;
41 ::ll::TypedStorage<4, 4, int> mAge;
42 ::ll::TypedStorage<4, 4, int> mHealth;
43 ::ll::TypedStorage<4, 4, int> mRandomPickupValue;
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
48 ExperienceOrb();
49
50public:
51 // virtual functions
52 // NOLINTBEGIN
53 virtual void reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
54
55 virtual void addAdditionalSaveData(::CompoundTag& tag) const /*override*/;
56
57 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
58
59 virtual void playerTouch(::Player& player) /*override*/;
60
61 virtual float getShadowRadius() const /*override*/;
62
63 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const /*override*/;
64
65 virtual ::ActorHurtResult _hurt(::ActorDamageSource const& damage, float, bool, bool) /*override*/;
66
67 virtual void doWaterSplashEffect() /*override*/;
68 // NOLINTEND
69
70public:
71 // member functions
72 // NOLINTBEGIN
73 MCAPI ExperienceOrb(
74 ::ActorDefinitionGroup* definitions,
75 ::ActorDefinitionIdentifier const& definitionName,
76 ::EntityContext& entityContext
77 );
78
79 MCAPI void _handleMending(::Player& player);
80
81 MCAPI void _tryMergeExistingOrbs();
82
83 MCAPI int getIconIndex() const;
84
85 MCAPI void postNormalTick();
86 // NOLINTEND
87
88public:
89 // static functions
90 // NOLINTBEGIN
91 MCAPI static void _spawnOrb(::BlockSource& region, ::Level& level, ::Vec3 const& pos, int orbXPValue);
92
93 MCAPI static bool _tryMergeIntoExistingOrbs(::BlockSource& region, ::Vec3 const& pos, int xpValue);
94
95 MCAPI static void spawnOrb(::BlockSource& region, ::Vec3 const& pos, int orbXPValue);
96
97 MCAPI static void spawnOrbs(
98 ::BlockSource& region,
99 ::Vec3 const& pos,
100 int xpValue,
101 ::ExperienceOrb::DropType dropType,
102 ::Player* owner
103 );
104
105 MCAPI static void spawnOrbs(
106 ::BlockSource& region,
107 ::Vec3 const& pos,
108 int randValueMin,
109 int randValueMax,
110 ::ExperienceOrb::DropType dropType,
111 ::Player* owner
112 );
113 // NOLINTEND
114
115public:
116 // constructor thunks
117 // NOLINTBEGIN
118 MCAPI void* $ctor(
119 ::ActorDefinitionGroup* definitions,
120 ::ActorDefinitionIdentifier const& definitionName,
121 ::EntityContext& entityContext
122 );
123 // NOLINTEND
124
125public:
126 // virtual function thunks
127 // NOLINTBEGIN
128 MCAPI void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
129
130 MCAPI void $addAdditionalSaveData(::CompoundTag& tag) const;
131
132 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
133
134 MCAPI void $playerTouch(::Player& player);
135
136 MCFOLD float $getShadowRadius() const;
137
138 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
139
140 MCAPI ::ActorHurtResult $_hurt(::ActorDamageSource const& damage, float, bool, bool);
141
142 MCFOLD void $doWaterSplashEffect();
143
144
145 // NOLINTEND
146
147public:
148 // vftables
149 // NOLINTBEGIN
150 MCAPI static void** $vftable();
151 // NOLINTEND
152};
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:37
Definition ActorHurtResult.h:5
Definition BlockSource.h:73
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition EntityContext.h:17
Definition Level.h:255
Definition Player.h:137
Definition Vec3.h:10
Definition ActorDefinitionIdentifier.h:15
Definition VariantParameterList.h:14