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