LeviLamina
Loading...
Searching...
No Matches
ReplaceItemCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/json/Value.h"
7#include "mc/deps/shared_types/legacy/EquipmentSlot.h"
8#include "mc/server/commands/Command.h"
9#include "mc/server/commands/CommandItem.h"
10#include "mc/server/commands/CommandPosition.h"
11#include "mc/server/commands/CommandSelector.h"
12#include "mc/world/level/block/BlockSlot.h"
13
14// auto generated forward declare list
15// clang-format off
16class Actor;
17class CommandOrigin;
18class CommandOutput;
19class CommandRegistry;
20namespace Util { struct ReplacementResults; }
21// clang-format on
22
24public:
25 // ReplaceItemCommand inner types define
26 enum class ReplaceMode : int {
27 Destroy = 0,
28 Keep = 1,
29 };
30
31 enum class TargetType : int {
32 Block = 0,
33 Entity = 1,
34 Undefined = 2,
35 };
36
37public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<4, 4, ::ReplaceItemCommand::TargetType> mTargetType;
41 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mTargetEntity;
42 ::ll::TypedStorage<4, 16, ::CommandPosition> mTargetBlock;
43 ::ll::TypedStorage<4, 4, ::BlockSlot> mBlockSlot;
44 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::EquipmentSlot> mEquipmentSlot;
45 ::ll::TypedStorage<4, 4, int> mSlotId;
46 ::ll::TypedStorage<8, 8, ::CommandItem> mItem;
47 ::ll::TypedStorage<4, 4, int> mAmount;
48 ::ll::TypedStorage<4, 4, int> mData;
49 ::ll::TypedStorage<4, 4, ::ReplaceItemCommand::ReplaceMode> mReplaceMode;
50 ::ll::TypedStorage<8, 16, ::Json::Value> mComponents;
51 ::ll::TypedStorage<1, 1, bool> mHaveComponents;
52 // NOLINTEND
53
54public:
55 // virtual functions
56 // NOLINTBEGIN
57 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
58
59 virtual ~ReplaceItemCommand() /*override*/ = default;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI void
66 _outputError(::CommandOutput& output, ::Util::ReplacementResults errorDetails, ::std::string const& itemName) const;
67 // NOLINTEND
68
69public:
70 // static functions
71 // NOLINTBEGIN
72 MCAPI static void setup(::CommandRegistry& registry);
73 // NOLINTEND
74
75public:
76 // virtual function thunks
77 // NOLINTBEGIN
78 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
79
80
81 // NOLINTEND
82
83public:
84 // vftables
85 // NOLINTBEGIN
86 MCNAPI static void** $vftable();
87 // NOLINTEND
88};
Definition Actor.h:106
Definition Block.h:43
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:50
Definition Command.h:17
Definition ReplaceItemCommand.h:23
static MCAPI void ** $vftable()
Definition ReplacementResults.h:7