Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ScriptStructureManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/script_core/lifetime_registry/scripting/StrongTypedObjectHandle.h"
7#include "mc/deps/script_core/lifetime_registry/scripting/WeakHandleFromThis.h"
8#include "mc/deps/script_core/lifetime_registry/scripting/WeakLifetimeScope.h"
9
10// auto generated forward declare list
11// clang-format off
12class ServerLevel;
14namespace ScriptModuleMinecraft { class ScriptStructureTemplate; }
15namespace Scripting { struct ClassBinding; }
16namespace Scripting { struct InvalidArgumentError; }
17// clang-format on
18
19namespace ScriptModuleMinecraft {
20
21class ScriptStructureManager : public ::Scripting::WeakHandleFromThis<::ScriptModuleMinecraft::ScriptStructureManager> {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
26 ::ll::TypedStorage<8, 8, ::gsl::not_null<::ServerLevel*>> mLevel;
27 ::ll::TypedStorage<
28 8,
29 64,
30 ::std::unordered_map<
31 ::std::string,
33 mStructures;
34 ::ll::TypedStorage<8, 32, ::std::optional<::std::vector<::std::string>>> mPackStructureIds;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 ScriptStructureManager(ScriptStructureManager const&);
40 ScriptStructureManager();
41
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCNAPI ::std::string_view _getPlaceErrorMessage(::std::string_view const key) const;
46
47 MCNAPI ::StructureTemplate const* _getStructure(
48 ::std::variant<
49 ::std::string,
51 scriptStructureOrName
52 ) const;
53
54 MCNAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptStructureTemplate>
56
57 MCNAPI ::ScriptModuleMinecraft::ScriptStructureManager&
59
60 MCNAPI ::std::optional<::Scripting::InvalidArgumentError> validateIdentifier(::std::string const& identifier) const;
61 // NOLINTEND
62
63public:
64 // static functions
65 // NOLINTBEGIN
66 MCNAPI static ::Scripting::ClassBinding bind();
67 // NOLINTEND
68};
69
70} // namespace ScriptModuleMinecraft
Definition ScriptStructureManager.h:21
MCAPI ::std::optional<::Scripting::InvalidArgumentError > validateIdentifier(::std::string const &identifier) const
MCAPI::std::string_view _getPlaceErrorMessage(::std::string_view const key) const
static MCAPI ::Scripting::ClassBinding bind()
MCAPI::StructureTemplate const * _getStructure(::std::variant< ::std::string, ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptStructureTemplate > > const &scriptStructureOrName) const
MCAPI::ScriptModuleMinecraft::ScriptStructureManager & operator=(::ScriptModuleMinecraft::ScriptStructureManager const &)
MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptStructureTemplate > getOrCreateScriptStructure(::StructureTemplate &structureTemplate)
Definition ScriptStructureTemplate.h:24
Definition StrongTypedObjectHandle.h:8
Definition WeakHandleFromThis.h:8
Definition ServerLevel.h:58
Definition StructureTemplate.h:35
Definition ClassBinding.h:10
Definition InvalidArgumentError.h:11