Skip to content
LeviMC
Home
Projects
Docs
6
LeviLamina
Mod loader for Minecraft Bedrock Edition
LegacyScriptEngine
Runs LLSE script plugins on LeviLamina
lip
General package installer
LeviLauncher
Bedrock launcher for Windows and Android
Be.D.D.
Scripted client input for mod tests
bedboo
Bedrock bots with a mineflayer-compatible API
All repositories on GitHub
Mods
Blog
Community
About
English
English
简体中文
繁體中文
Auto
Light
Dark
Auto
Light
Dark
LeviLamina
User Guides
Developer Guides
API Guides
API Reference
Maintainer Guides
Resources
LeviLamina on GitHub
LeviMC
Home
Projects
Docs
6
LeviLamina
Mod loader for Minecraft Bedrock Edition
LegacyScriptEngine
Runs LLSE script plugins on LeviLamina
lip
General package installer
LeviLauncher
Bedrock launcher for Windows and Android
Be.D.D.
Scripted client input for mod tests
bedboo
Bedrock bots with a mineflayer-compatible API
All repositories on GitHub
Mods
Blog
Community
About
API Reference
On this page
LeviLamina
User Guides
Developer Guides
API Guides
API Reference
Maintainer Guides
Search
Ctrl
K
Loading...
Searching...
No Matches
ActorUniqueID.h
1
#pragma once
2
3
#include "mc/_HeaderOutputPredefine.h"
4
5
struct
ActorUniqueID
{
6
public
:
7
[[nodiscard]]
constexpr
bool
operator==(
ActorUniqueID
const
& other)
const
noexcept
{
return
rawID == other.rawID; }
8
9
[[nodiscard]]
constexpr
std::strong_ordering operator<=>(
ActorUniqueID
const
& other)
const
noexcept
{
10
return
rawID <=> other.rawID;
11
}
12
13
public
:
14
// member variables
15
// NOLINTBEGIN
16
int64 rawID;
17
// NOLINTEND
18
19
public
:
20
// member functions
21
// NOLINTBEGIN
22
MCNAPI uint64
getHash
()
const
;
23
24
MCNAPI ::std::string
toString
()
const
;
25
// NOLINTEND
26
27
public
:
28
// static variables
29
// NOLINTBEGIN
30
MCAPI static ::ActorUniqueID
const
& INVALID_ID();
31
// NOLINTEND
32
};
33
34
namespace
std
{
35
template
<>
36
struct
hash<
ActorUniqueID
> {
37
size_t
operator()(
ActorUniqueID
const
&
id
)
const
noexcept
{
38
static
std::hash<int64> hasher;
39
std::size_t seed = 0;
40
seed ^= hasher(
id
.rawID >> 32) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
41
seed ^= hasher(
id
.rawID & 0xffffffff) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
42
return
seed;
43
}
44
};
45
}
// namespace std
std
STL namespace.
ActorUniqueID
Definition
ActorUniqueID.h:5
ActorUniqueID::getHash
MCAPI uint64 getHash() const
ActorUniqueID::toString
MCAPI::std::string toString() const
src
mc
legacy
ActorUniqueID.h
Generated on
for LeviLamina by
1.16.1