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/shared_types/legacy/EquipmentSlot.h"
7#include "mc/server/commands/Command.h"
8#include "mc/server/commands/CommandPositionFloat.h"
9#include "mc/server/commands/CommandSelector.h"
10#include "mc/world/level/block/BlockSlot.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class CommandOrigin;
16class CommandOutput;
17class CommandRegistry;
18class ItemRegistryRef;
19class Player;
20namespace Util { struct ReplacementResults; }
21// clang-format on
22
23class LootCommand : public ::Command {
24public:
25 // LootCommand inner types define
26 enum class Source : int {
27 Loot = 0,
28 Kill = 1,
29 Mine = 2,
30 Error = 3,
31 };
32
33 enum class Target : int {
34 Spawn = 0,
35 Give = 1,
36 Insert = 2,
37 Replace = 3,
38 Error = 4,
39 };
40
41 enum class TargetIdentifier : int {
42 Entity = 0,
43 Block = 1,
44 Error = 2,
45 };
46
47public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<4, 16, ::CommandPositionFloat> mPosition;
51 ::ll::TypedStorage<4, 16, ::CommandPositionFloat> mMinePosition;
52 ::ll::TypedStorage<4, 4, ::LootCommand::Target> mTarget;
53 ::ll::TypedStorage<4, 4, ::LootCommand::Source> mSource;
54 ::ll::TypedStorage<4, 4, ::LootCommand::TargetIdentifier> mReplacementIdentifier;
55 ::ll::TypedStorage<8, 32, ::std::string> mLootTable;
56 ::ll::TypedStorage<8, 32, ::std::string> mTool;
57 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mEntitySource;
58 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mEntityTarget;
59 ::ll::TypedStorage<8, 200, ::CommandSelector<::Player>> mPlayerTarget;
60 ::ll::TypedStorage<4, 4, ::BlockSlot> mBlockSlot;
61 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::EquipmentSlot> mEquipmentSlot;
62 ::ll::TypedStorage<4, 4, int> mSlotId;
63 ::ll::TypedStorage<4, 4, int> mConsecutiveSlotFillCount;
64 ::ll::TypedStorage<1, 1, bool> mSlotFillCountIsSet;
65 // NOLINTEND
66
67public:
68 // virtual functions
69 // NOLINTBEGIN
70 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCAPI void
77 _outputError(::CommandOutput& output, ::Util::ReplacementResults const errorDetails, ::Actor const* entity) const;
78 // NOLINTEND
79
80public:
81 // static functions
82 // NOLINTBEGIN
83 MCAPI static void _outputSuccess(::CommandOutput& output, int numItemsDropped);
84
85 MCAPI static void setup(::CommandRegistry& registry, ::ItemRegistryRef itemRegistry);
86 // NOLINTEND
87
88public:
89 // virtual function thunks
90 // NOLINTBEGIN
91 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
92
93
94 // NOLINTEND
95};
Definition Actor.h:114
Definition Block.h:42
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:49
Definition Command.h:17
Definition ItemRegistryRef.h:42
Definition LootCommand.h:23
Definition Player.h:129
Definition ReplacementResults.h:7