LeviLamina
Loading...
Searching...
No Matches
CommandUtils.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/OwnerPtr.h"
7#include "mc/deps/shared_types/legacy/Difficulty.h"
8#include "mc/world/actor/ActorType.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
13class BlockActor;
14class BlockPos;
15class BlockSource;
16class CommandFilePath;
17class CommandOutput;
18class CompoundTag;
19class EntityContext;
20class FunctionEntry;
21class ItemInstance;
22class ItemStack;
23class Level;
24class LevelData;
25class Player;
26class Vec3;
28namespace Bedrock::Safety { class RedactableString; }
29namespace Json { class Value; }
30class BlockPos;
31class Vec3;
32class Player;
33class Actor;
34// clang-format on
35
36namespace CommandUtils {
37// functions
38// NOLINTBEGIN
39MCAPI ::Actor* addToLevel(::OwnerPtr<::EntityContext> entity, ::BlockSource& region);
40
41MCAPI void addtoCSVList(::std::string& list, ::std::string const& newItem);
42
43MCAPI void alterSpawnableEntities(
44 ::LevelData& levelData,
47);
48
49MCAPI void broadcastPlayerSpawnedMobEvent(::Actor const& entity, ::Actor& summoner);
50
51MCAPI void convertBlockEntityTag(::CompoundTag& tag, ::BlockActor const& entity, ::BlockPos const& offset);
52
53MCAPI ::ItemStack createItemStack(::std::string const& itemName, int amount, int data);
54
55MCAPI ::std::vector<::ItemStack> createItemStacks(::ItemInstance const& item, int amount, int& given);
56
57MCAPI bool createMapData(::Actor& entity, ::ItemInstance& itemInstance, ::CommandOutput& output);
58
59MCAPI void displayLocalizableMessage(
60 bool feedbackRuleDisables,
61 ::Player& player,
62 ::std::string const& message,
63 ::std::vector<::std::string> const& params
64);
65
66MCAPI ::std::string getActorName(::Actor const& actor);
67
68MCAPI ::Vec3 getFeetPos(::Actor const* entity);
69
70MCAPI ::std::vector<::ActorType> getInvalidCommandEntities();
71
72MCAPI ::std::string getTelemetryErrorList(::CommandOutput const& output);
73
74MCAPI bool isFunctionValid(::CommandOutput& output, ::FunctionEntry& functionEntry, ::std::string const& resolvedPath);
75
76MCAPI bool isPlayerSpawnedMob(::Actor const& entity, ::Actor const& summoner);
77
78MCAPI void nameEntity(::Actor& actor, bool nameSet, ::Bedrock::Safety::RedactableString const& actorName);
79
80MCAPI void setDifficulty(::Level& level, ::SharedTypes::Legacy::Difficulty difficulty);
81
82MCAPI void setInitEvent(::ActorDefinitionIdentifier& actorId, ::std::string const& eventName);
83
84MCAPI ::std::string toJsonResult(::std::string const& commandName, ::Json::Value const& rawData);
85
86MCAPI ::std::string const validatePath(::CommandOutput& output, ::CommandFilePath const& filePath);
87// NOLINTEND
88
89// static variables
90// NOLINTBEGIN
91MCAPI ::std::vector<::std::pair<::std::string, char>> const& CMD_INPUT_UNICODE_TRANSLATE_MAP();
92// NOLINTEND
93
94} // namespace CommandUtils
Definition Actor.h:103
Definition RedactableString.h:10
Definition BlockActor.h:32
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition CommandFilePath.h:5
Definition CommandOutput.h:19
Definition CompoundTag.h:13
Definition EntityContext.h:16
Definition FunctionEntry.h:15
Definition ItemInstance.h:16
Definition ItemStack.h:25
Definition Value.h:16
Definition LevelData.h:49
Definition Level.h:238
Definition OwnerPtr.h:7
Definition Player.h:119
Definition Vec3.h:10
Definition ActorDefinitionIdentifier.h:15