LeviLamina
Loading...
Searching...
No Matches
LootTableContext.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/level/storage/loot/ActorTarget.h"
8#include "mc/world/level/storage/loot/LootTable.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
14class ILevel;
15class ItemStack;
16class Level;
17class Player;
18// clang-format on
19
20class LootTableContext {
21public:
22 // LootTableContext inner types declare
23 // clang-format off
24 class Builder;
25 // clang-format on
26
27 // LootTableContext inner types define
28 class Builder {
29 public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 8, ::ILevel*> mLevel;
33 ::ll::TypedStorage<4, 4, float> mLuck;
34 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mThisEntityID;
35 ::ll::TypedStorage<8, 8, ::Player*> mKillerPlayer;
36 ::ll::TypedStorage<8, 8, ::Actor*> mKilledActor;
37 ::ll::TypedStorage<8, 8, ::ActorDamageSource const*> mDeathSource;
38 ::ll::TypedStorage<4, 4, float> mExplosionRadius;
39 ::ll::TypedStorage<8, 32, ::std::string> mOriginalItemName;
40 ::ll::TypedStorage<8, 8, ::ItemStack const*> mTool;
41 ::ll::TypedStorage<4, 4, ::DimensionType> mDimensionId;
42 // NOLINTEND
43
44 public:
45 // prevent constructor by default
46 Builder();
47
48 public:
49 // member functions
50 // NOLINTBEGIN
51 MCAPI Builder(::ILevel* level, ::DimensionType dimensionId);
52
53 MCAPI ::LootTableContext create() const;
54
55 MCAPI ::LootTableContext::Builder& withDeathSource(::ActorDamageSource const* deathSource);
56
57 MCAPI ::LootTableContext::Builder& withExplosionRadius(float explosionRadius);
58
59 MCAPI ::LootTableContext::Builder& withKilledActor(::Actor* actor);
60
61 MCFOLD ::LootTableContext::Builder& withKillerPlayer(::Player* player);
62
63 MCAPI ::LootTableContext::Builder& withLuck(float luck);
64
65 MCAPI ::LootTableContext::Builder& withThisEntity(::Actor* actor);
66
67 MCAPI ::LootTableContext::Builder& withTool(::ItemStack const* tool);
68
69 MCAPI ~Builder();
70 // NOLINTEND
71
72 public:
73 // constructor thunks
74 // NOLINTBEGIN
75 MCAPI void* $ctor(::ILevel* level, ::DimensionType dimensionId);
76 // NOLINTEND
77
78 public:
79 // destructor thunk
80 // NOLINTBEGIN
81 MCAPI void $dtor();
82 // NOLINTEND
83 };
84
85public:
86 // member variables
87 // NOLINTBEGIN
88 ::ll::TypedStorage<4, 4, float> mLuck;
89 ::ll::TypedStorage<8, 8, ::ILevel*> mLevel;
90 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mThisEntityID;
91 ::ll::TypedStorage<8, 8, ::Player*> mKillerPlayer;
92 ::ll::TypedStorage<8, 8, ::Actor*> mKilledActor;
93 ::ll::TypedStorage<8, 8, ::ActorDamageSource const*> mDeathSource;
94 ::ll::TypedStorage<8, 64, ::std::unordered_set<::LootTable const*>> mVisitedTables;
95 ::ll::TypedStorage<4, 4, float> mExplosionRadius;
96 ::ll::TypedStorage<8, 32, ::std::string> mOriginalItemName;
97 ::ll::TypedStorage<8, 8, ::ItemStack const*> mTool;
98 ::ll::TypedStorage<4, 4, ::DimensionType> mDimensionId;
99 // NOLINTEND
100
101public:
102 // prevent constructor by default
103 LootTableContext();
104
105public:
106 // member functions
107 // NOLINTBEGIN
108 MCAPI LootTableContext(
109 float luck,
110 ::ILevel* level,
111 ::ActorUniqueID thisEntityID,
112 ::Player* player,
113 ::Actor* killedActor,
114 ::ActorDamageSource const* deathSource,
115 float explosionRadius,
116 ::DimensionType dimensionId,
117 ::ItemStack const* tool
118 );
119
120 MCAPI ::Actor* getDamagingEntity() const;
121
122 MCAPI ::DimensionType getDimensionId() const;
123
124 MCAPI ::Actor* getEntity(::ActorTarget target, bool getRemoved) const;
125
126 MCAPI float getExplosionRadius() const;
127
128 MCFOLD ::Actor* getKilledEntity() const;
129
130 MCAPI ::Actor* getKillerEntity() const;
131
132 MCAPI ::Actor* getKillerPet() const;
133
134 MCFOLD ::Actor* getKillerPlayer() const;
135
136 MCFOLD ::Level* getLevel() const;
137
138 MCAPI ::std::string getOriginalItemName() const;
139
140 MCAPI ::Actor* getThisEntity(bool getRemoved) const;
141
142 MCAPI ::Actor* getThisVehicleEntity() const;
143
144 MCFOLD ::ItemStack const* getTool() const;
145
146 MCAPI void setOriginalItemName(::std::string const& originalItemName);
147
148 MCAPI ~LootTableContext();
149 // NOLINTEND
150
151public:
152 // constructor thunks
153 // NOLINTBEGIN
154 MCAPI void* $ctor(
155 float luck,
156 ::ILevel* level,
157 ::ActorUniqueID thisEntityID,
158 ::Player* player,
159 ::Actor* killedActor,
160 ::ActorDamageSource const* deathSource,
161 float explosionRadius,
162 ::DimensionType dimensionId,
163 ::ItemStack const* tool
164 );
165 // NOLINTEND
166
167public:
168 // destructor thunk
169 // NOLINTBEGIN
170 MCAPI void $dtor();
171 // NOLINTEND
172};
Definition ActorDamageSource.h:18
Definition Actor.h:123
Definition ILevel.h:218
Definition ItemStack.h:35
Definition Level.h:254
Definition LootTableContext.h:28
Definition Player.h:136
Definition ActorUniqueID.h:10