LeviLamina
Loading...
Searching...
No Matches
LootTableUtils.h
1
#pragma once
2
3
#include "mc/_HeaderOutputPredefine.h"
4
5
// auto generated inclusion list
6
#include "mc/deps/core/utility/AutomaticID.h"
7
8
// auto generated forward declare list
9
// clang-format off
10
class
Actor
;
11
class
ActorDamageSource
;
12
class
Container
;
13
class
Dimension
;
14
class
ItemStack
;
15
class
Level
;
16
class
LootTable
;
17
class
LootTableContext
;
18
class
Player
;
19
class
Random
;
20
// clang-format on
21
22
namespace
Util {
23
24
class
LootTableUtils
{
25
public
:
26
// static functions
27
// NOLINTBEGIN
28
MCAPI static ::std::string convertFromJavaLootTableName(::std::string
const
& lootTableName);
29
30
MCAPI
static
void
fillContainer(
31
::Level
& level,
32
::Container
& container,
33
::Random
& random,
34
::std::string
const
& tableName,
35
::DimensionType
dimensionId,
36
::Actor
* entity
37
);
38
39
MCAPI static ::std::vector<::ItemStack> generateRandomDeathLoot(
40
::LootTable
const
& table,
41
::Actor
& lootSourceEntity,
42
::ActorDamageSource
const
* damageSource,
43
::ItemStack
const
* tool,
44
::Player
* killer,
45
float
luck
46
);
47
48
MCAPI static ::std::vector<::ItemStack>
49
getRandomItems(::std::string
const
& tableName,
::Random
& random,
::LootTableContext
&
context
);
50
51
MCAPI
static
int
givePlayer(
::Player
& player, ::std::vector<::ItemStack>& items,
bool
shouldAddWhenFull);
52
// NOLINTEND
53
};
54
55
}
// namespace Util
ActorDamageSource
Definition
ActorDamageSource.h:18
Actor
Definition
Actor.h:102
AutomaticID
Definition
AutomaticID.h:6
Container
Definition
Container.h:31
Dimension
Definition
Dimension.h:83
ItemStack
Definition
ItemStack.h:23
Level
Definition
Level.h:243
LootTableContext
Definition
LootTableContext.h:19
LootTable
Definition
LootTable.h:15
Player
Definition
Player.h:123
Random
Definition
Random.h:10
Util::LootTableUtils
Definition
LootTableUtils.h:24
context
Definition
context.h:5
src-server
mc
util
LootTableUtils.h
Generated on Sun Oct 12 2025 06:32:11 for LeviLamina by
1.12.0