Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
LootPoolEntry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/world/level/storage/loot/predicates/LootItemCondition.h"
5
6// auto generated inclusion list
7#include "mc/deps/core/sem_ver/SemVersion.h"
8
9// auto generated forward declare list
10// clang-format off
11class ItemStack;
14class Random;
16namespace Json { class Value; }
17// clang-format on
18
20public:
21 // LootPoolEntry inner types define
22 enum class EntryType : int {
23 LootItem = 0,
24 EmptyLootItem = 1,
27 };
28
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<4, 4, int> mWeight;
33 ::ll::TypedStorage<4, 4, int> mQuality;
34 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::LootItemCondition>>> mConditions;
35 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LootPoolEntry>> mSubTable;
36 ::ll::TypedStorage<8, 24, ::SemVersion> mJsonVersion;
37 // NOLINTEND
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual bool
43 _createItem(::std::vector<::ItemStack>& output, ::Random& random, ::LootTableContext& context) const = 0;
44
45 virtual ~LootPoolEntry() = default;
46
47 virtual ::LootPoolEntry::EntryType getEntryType() const = 0;
48 // NOLINTEND
49
50public:
51 // static functions
52 // NOLINTBEGIN
53#ifdef LL_PLAT_S
54 MCNAPI static ::std::unique_ptr<::LootPoolEntry> deserialize(
55 ::Json::Value const& entryJson,
56 bool usingUpcomingCreatorFeaturesExperiment,
57 ::SemVersion const& jsonVersion
58 );
59#endif
60 // NOLINTEND
61
62public:
63 // static variables
64 // NOLINTBEGIN
65 MCNAPI static ::SemVersionConstant const& START_VERSIONING_VERSION();
66 // NOLINTEND
67};
Definition EmptyLootItem.h:15
Definition ItemStack.h:26
Definition Value.h:16
Definition LootItemCondition.h:12
Definition LootItem.h:17
Definition LootPoolEntry.h:19
static MCAPI ::SemVersionConstant const & START_VERSIONING_VERSION()
Definition LootTableContext.h:20
Definition LootTableEntry.h:16
Definition LootTableReference.h:15
Definition Random.h:10
Definition SemVersionConstant.h:8
Definition SemVersion.h:15
Definition context.h:5