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
& entity,
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:104
AutomaticID
Definition
AutomaticID.h:6
Container
Definition
Container.h:30
Dimension
Definition
Dimension.h:83
ItemStack
Definition
ItemStack.h:25
Level
Definition
Level.h:234
LootTableContext
Definition
LootTableContext.h:20
LootTable
Definition
LootTable.h:14
Player
Definition
Player.h:119
Random
Definition
Random.h:16
Util::LootTableUtils
Definition
LootTableUtils.h:24
context
Definition
context.h:5
src
mc
util
LootTableUtils.h
Generated on Sat Apr 26 2025 05:55:59 for LeviLamina by
1.12.0