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
13class BlockSource;
14class CompoundTag;
15class DataLoadHelper;
16class Level;
17class Player;
18class Vec3;
20// clang-format on
21
22class ExperienceOrb : public ::Actor {
23public:
24 // ExperienceOrb inner types define
25 enum class DropType : uchar {
26 NoType = 0,
27 FromBlock = 1,
28 FromMob = 2,
29 FromPlayer = 3,
30 };
31
32public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mFollowingPlayer;
36 ::ll::TypedStorage<4, 4, int> mFollowingTime;
37 ::ll::TypedStorage<4, 4, int> mAge;
38 ::ll::TypedStorage<4, 4, int> mHealth;
39 ::ll::TypedStorage<4, 4, int> mRandomPickupValue;
40 // NOLINTEND
41
42public:
43 // virtual functions
44 // NOLINTBEGIN
45 virtual void reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
46
47 virtual void addAdditionalSaveData(::CompoundTag& tag) const /*override*/;
48
49 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
50
51 virtual void playerTouch(::Player& player) /*override*/;
52
53 virtual float getShadowRadius() const /*override*/;
54
55 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const /*override*/;
56
57 virtual bool _hurt(::ActorDamageSource const&, float damage, bool, bool) /*override*/;
58
59 virtual void doWaterSplashEffect() /*override*/;
60
61 virtual ~ExperienceOrb() /*override*/ = default;
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI void _handleMending(::Player& player);
68
69 MCAPI void _tryMergeExistingOrbs();
70
71 MCAPI int getValue() const;
72
73 MCAPI void postNormalTick();
74 // NOLINTEND
75
76public:
77 // static functions
78 // NOLINTBEGIN
79 MCAPI static void _spawnOrb(::BlockSource& region, ::Level& level, ::Vec3 const& pos, int orbXPValue);
80
81 MCAPI static bool _tryMergeIntoExistingOrbs(::BlockSource& region, ::Vec3 const& pos, int xpValue);
82
83 MCAPI static void spawnOrbs(
84 ::BlockSource& region,
85 ::Vec3 const& pos,
86 int xpValue,
87 ::ExperienceOrb::DropType dropType,
88 ::Player* owner
89 );
90 // NOLINTEND
91
92public:
93 // virtual function thunks
94 // NOLINTBEGIN
95 MCAPI void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
96
97 MCAPI void $addAdditionalSaveData(::CompoundTag& tag) const;
98
99 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
100
101 MCAPI void $playerTouch(::Player& player);
102
103 MCFOLD float $getShadowRadius() const;
104
105 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
106
107 MCAPI bool $_hurt(::ActorDamageSource const&, float damage, bool, bool);
108
109 MCFOLD void $doWaterSplashEffect();
110
111
112 // NOLINTEND
113
114public:
115 // vftables
116 // NOLINTBEGIN
117 MCAPI static void** $vftable();
118 // NOLINTEND
119};
Definition ActorDamageSource.h:18
Definition BlockSource.h:68
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ExperienceOrb.h:22
Definition Level.h:249
Definition Player.h:125
Definition Vec3.h:10
Definition VariantParameterList.h:13