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
23class ReplaceItemCommand : public ::Command {
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 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI ReplaceItemCommand();
64
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 // constructor thunks
77 // NOLINTBEGIN
78 MCAPI void* $ctor();
79 // NOLINTEND
80
81public:
82 // virtual function thunks
83 // NOLINTBEGIN
84 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
85
86
87 // NOLINTEND
88
89public:
90 // vftables
91 // NOLINTBEGIN
92 MCNAPI static void** $vftable();
93 // NOLINTEND
94};
95
96// clang-format off
97template <>
98MCAPI ::ll::type_id_ref Bedrock::typeid_storage_impl<class CommandRegistry, ::ReplaceItemCommand::ReplaceMode>();
99template <>
100MCAPI ::ll::type_id_ref Bedrock::typeid_storage_impl<class CommandRegistry, ::ReplaceItemCommand::TargetType>();
101// clang-format on
Definition Actor.h:125
Definition Block.h:69
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
static MCAPI void ** $vftable()
Definition ReplacementResults.h:7