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;
17namespace ScriptModuleMinecraft { struct ScriptNamespaceNameError; }
18namespace ScriptModuleMinecraft { struct ScriptSpawnRulesInvalidRegistryError; }
19namespace Scripting { struct InvalidArgumentError; }
20namespace br::spawn { struct EntityType; }
21// clang-format on
22
23namespace ScriptModuleMinecraft {
24
25class ScriptCustomSpawnRulesRegistry : public ::ScriptModuleMinecraft::ScriptServerStateMonitor {
26public:
27 // ScriptCustomSpawnRulesRegistry inner types define
28 using EntityPredicate = ::std::function<
29 bool(::br::spawn::EntityType const&, ::BlockSource&, ::br::spawn::EntitySpawnReason&, ::BlockPos, ::IRandom&)>;
30
31 using ObstructionPredicate = ::std::function<bool(::BlockSource&, ::Mob const&, ::br::spawn::EntityType const&)>;
32
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 8, ::ServerLevel&> mLevel;
37 // NOLINTEND
38
39public:
40 // prevent constructor by default
41 ScriptCustomSpawnRulesRegistry& operator=(ScriptCustomSpawnRulesRegistry const&);
42 ScriptCustomSpawnRulesRegistry(ScriptCustomSpawnRulesRegistry const&);
43 ScriptCustomSpawnRulesRegistry();
44
45public:
46 // virtual functions
47 // NOLINTBEGIN
48 virtual void _onReload() /*override*/;
49
50 virtual ~ScriptCustomSpawnRulesRegistry() /*override*/ = default;
51 // NOLINTEND
52
53public:
54 // member functions
55 // NOLINTBEGIN
56 MCAPI ::Scripting::Result<
57 void,
61 registerEntitySpawnCallback(
62 ::std::string const& id,
63 ::std::function<bool(
66 ::br::spawn::EntitySpawnReason&,
69 )> callback
70 );
71
72 MCAPI ::Scripting::Result<
73 void,
77 registerObstructionCallback(
78 ::std::string const& id,
79 ::std::function<bool(::BlockSource&, ::Mob const&, ::br::spawn::EntityType const&)> callback
80 );
81 // NOLINTEND
82
83public:
84 // virtual function thunks
85 // NOLINTBEGIN
86 MCAPI void $_onReload();
87
88
89 // NOLINTEND
90
91public:
92 // vftables
93 // NOLINTBEGIN
94 MCNAPI static void** $vftable();
95 // NOLINTEND
96};
97
98} // namespace ScriptModuleMinecraft
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition IRandom.h:13
Definition Mob.h:50
Definition ScriptServerStateMonitor.h:16
Definition ServerLevel.h:50
Definition ScriptNamespaceNameError.h:18
Definition ScriptSpawnRulesInvalidRegistryError.h:17
Definition InvalidArgumentError.h:17
Definition EntityType.h:16