LeviLamina
Loading...
Searching...
No Matches
ScriptCustomSpawnRulesRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/runtime/Result.h"
7#include "mc/scripting/modules/minecraft/ScriptServerStateMonitor.h"
8#include "mc/world/level/chunk/EntitySpawnReason.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockPos;
13class BlockSource;
14class IRandom;
15class Mob;
16class ServerLevel;
18namespace ScriptModuleMinecraft { struct ScriptNamespaceNameError; }
19namespace ScriptModuleMinecraft { struct ScriptSpawnRulesInvalidRegistryError; }
20namespace Scripting { struct InvalidArgumentError; }
21namespace br::spawn { struct EntityType; }
22// clang-format on
23
24namespace ScriptModuleMinecraft {
25
26class ScriptCustomSpawnRulesRegistry : public ::ScriptModuleMinecraft::ScriptServerStateMonitor {
27public:
28 // ScriptCustomSpawnRulesRegistry inner types define
29 using EntityPredicate = ::std::function<
30 bool(::br::spawn::EntityType const&, ::BlockSource&, ::br::spawn::EntitySpawnReason&, ::BlockPos, ::IRandom&)>;
31
32 using ObstructionPredicate = ::std::function<bool(::BlockSource&, ::Mob const&, ::br::spawn::EntityType const&)>;
33
34public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<8, 8, ::ServerLevel&> mLevel;
38 // NOLINTEND
39
40public:
41 // prevent constructor by default
42 ScriptCustomSpawnRulesRegistry& operator=(ScriptCustomSpawnRulesRegistry const&);
43 ScriptCustomSpawnRulesRegistry(ScriptCustomSpawnRulesRegistry const&);
44 ScriptCustomSpawnRulesRegistry();
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49 virtual void _onReload() /*override*/;
50 // NOLINTEND
51
52public:
53 // member functions
54 // NOLINTBEGIN
55 MCAPI ScriptCustomSpawnRulesRegistry(::ServerScriptManagerEvents& events, ::ServerLevel& level);
56
57 MCAPI ::Scripting::Result<
58 void,
62 registerEntitySpawnCallback(
63 ::std::string const& id,
64 ::std::function<bool(
67 ::br::spawn::EntitySpawnReason&,
70 )> callback
71 );
72
73 MCAPI ::Scripting::Result<
74 void,
78 registerObstructionCallback(
79 ::std::string const& id,
80 ::std::function<bool(::BlockSource&, ::Mob const&, ::br::spawn::EntityType const&)> callback
81 );
82 // NOLINTEND
83
84public:
85 // constructor thunks
86 // NOLINTBEGIN
87 MCAPI void* $ctor(::ServerScriptManagerEvents& events, ::ServerLevel& level);
88 // NOLINTEND
89
90public:
91 // virtual function thunks
92 // NOLINTBEGIN
93 MCAPI void $_onReload();
94
95
96 // NOLINTEND
97
98public:
99 // vftables
100 // NOLINTBEGIN
101 MCNAPI static void** $vftable();
102 // NOLINTEND
103};
104
105} // namespace ScriptModuleMinecraft
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition IRandom.h:10
Definition Mob.h:57
Definition ScriptServerStateMonitor.h:16
Definition ServerLevel.h:59
Definition ScriptNamespaceNameError.h:18
Definition ScriptSpawnRulesInvalidRegistryError.h:17
Definition InvalidArgumentError.h:17
Definition ServerScriptManagerEvents.h:13
Definition EntityType.h:17