LeviLamina
Loading...
Searching...
No Matches
LootCommand.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#include "mc/server/commands/Command.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class CommandOrigin;
13class CommandOutput;
14class CommandRegistry;
15class Dimension;
16class ItemRegistryRef;
17class ItemStack;
18class Level;
19namespace Util { struct ReplacementResults; }
20// clang-format on
21
22class LootCommand : public ::Command {
23public:
24 // LootCommand inner types define
25 enum class Target : int {
26 Spawn = 0,
27 Give = 1,
28 Insert = 2,
29 Replace = 3,
30 Error = 4,
31 };
32
33 enum class TargetIdentifier : int {
34 Entity = 0,
35 Block = 1,
36 Error = 2,
37 };
38
39 enum class Source : int {
40 Loot = 0,
41 Kill = 1,
42 Mine = 2,
43 Error = 3,
44 };
45
46public:
47 // member variables
48 // NOLINTBEGIN
64 // NOLINTEND
65
66public:
67 // prevent constructor by default
68 LootCommand& operator=(LootCommand const&);
70
71public:
72 // virtual functions
73 // NOLINTBEGIN
74 // vIndex: 2
75 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
76
77 // vIndex: 0
78 virtual ~LootCommand() /*override*/ = default;
79 // NOLINTEND
80
81public:
82 // member functions
83 // NOLINTBEGIN
84 MCAPI LootCommand();
85
86 MCAPI ::std::optional<::std::vector<::ItemStack>> _getItemsFromSource(
87 ::CommandOrigin const& origin,
88 ::CommandOutput& output,
89 ::ItemStack const& tool,
90 ::Level& level,
91 ::DimensionType dimensionId
92 ) const;
93
94 MCAPI void
95 _outputError(::CommandOutput& output, ::Util::ReplacementResults errorDetails, ::Actor const* entity) const;
96
97 MCAPI void _outputSuccess(::CommandOutput& output, int numItemsDropped) const;
98
99 MCAPI void
100 _placeItemsInTarget(::CommandOrigin const& origin, ::CommandOutput& output, ::std::vector<::ItemStack>& items)
101 const;
102
103 MCAPI ::ItemStack getToolItemStack(::CommandOrigin const& origin, ::CommandOutput& output) const;
104 // NOLINTEND
105
106public:
107 // static functions
108 // NOLINTBEGIN
109 MCAPI static void setup(::CommandRegistry& registry, ::ItemRegistryRef itemRegistry);
110 // NOLINTEND
111
112public:
113 // constructor thunks
114 // NOLINTBEGIN
115 MCAPI void* $ctor();
116 // NOLINTEND
117
118public:
119 // destructor thunk
120 // NOLINTBEGIN
121
122 // NOLINTEND
123
124public:
125 // virtual function thunks
126 // NOLINTBEGIN
127 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
128 // NOLINTEND
129
130public:
131 // vftables
132 // NOLINTBEGIN
133 MCAPI static void** $vftable();
134 // NOLINTEND
135};
Definition Actor.h:104
Definition AutomaticID.h:6
Definition Block.h:36
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:44
Definition Command.h:17
Definition Dimension.h:83
Definition ItemRegistryRef.h:29
Definition ItemStack.h:25
Definition Level.h:234
Definition LootCommand.h:22
Definition ReplacementResults.h:7
Definition Alias.h:14