Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
WorldClockRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/core/utility/UniqueOwnerPointer.h"
8#include "mc/platform/brstd/flat_map.h"
9
10// auto generated forward declare list
11// clang-format off
12class HashedString;
13class LevelData;
15class PacketSender;
16class TimeMarker;
17class WorldClock;
18struct WorldClockData;
20// clang-format on
21
23public:
24 // WorldClockRegistry inner types define
25 using RegistrationResult =
26 ::nonstd::expected<::Bedrock::NotNullNonOwnerPtr<::WorldClock>, ::WorldClockRegistrationError>;
27
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<
32 8,
33 48,
35 uint64,
37 ::std::less<uint64>,
38 ::std::vector<uint64>,
39 ::std::vector<::Bedrock::UniqueOwnerPointer<::WorldClock>>>>
40 mClocks;
41 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::LevelEventCoordinator>> mLevelEventCoordinator;
42 // NOLINTEND
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 virtual ~WorldClockRegistry() = default;
48
49 virtual void tick(::PacketSender& packetSender, ::LevelData const& levelData) = 0;
50 // NOLINTEND
51
52public:
53 // member functions
54 // NOLINTBEGIN
55 MCNAPI ::nonstd::expected<::Bedrock::NotNullNonOwnerPtr<::WorldClock>, ::WorldClockRegistrationError>
56 _registerClock(::HashedString const& name, ::std::vector<::TimeMarker> const& timeMarkers, bool isVanilla);
57
58 MCNAPI ::Bedrock::NonOwnerPointer<::WorldClock> const _tryGetClock(::HashedString const& name);
59
60 MCNAPI int getTime(::HashedString const& clockName) const;
61
62 MCNAPI void setTime(::HashedString const& clockName, int time);
63
64 MCNAPI ::std::vector<::WorldClockData> toData() const;
65
66 MCNAPI ::Bedrock::NonOwnerPointer<::WorldClock const> const tryGetClock(::HashedString const& name) const;
67 // NOLINTEND
68};
Definition UniqueOwnerPointer.h:11
Definition HashedString.h:5
Definition LevelData.h:57
Definition LevelEventCoordinator.h:22
Definition PacketSender.h:17
Definition TimeMarker.h:13
Definition WorldClockRegistry.h:22
MCAPI void setTime(::HashedString const &clockName, int time)
MCAPI ::Bedrock::NonOwnerPointer<::WorldClock const > const tryGetClock(::HashedString const &name) const
MCAPI ::Bedrock::NonOwnerPointer<::WorldClock > const _tryGetClock(::HashedString const &name)
MCAPI int getTime(::HashedString const &clockName) const
MCAPI ::std::vector<::WorldClockData > toData() const
MCAPI ::nonstd::expected<::Bedrock::NotNullNonOwnerPtr<::WorldClock >, ::WorldClockRegistrationError > _registerClock(::HashedString const &name, ::std::vector<::TimeMarker > const &timeMarkers, bool isVanilla)
Definition WorldClock.h:23
Definition flat_map.h:15
Definition WorldClockData.h:12
Definition WorldClockRegistrationError.h:9