Lodestone.Minecraft.Common
Loading...
Searching...
No Matches
Abilities.h
Go to the documentation of this file.
1//
2// Created by DexrnZacAttack on 11/27/25 using zPc-i2.
3//
4#ifndef LODESTONE_GAMEMODE_H
5#define LODESTONE_GAMEMODE_H
7
9 struct Abilities {
10 bool canFly;
13
14 bool operator==(const Abilities &rhs) const {
15 return this->canFly == rhs.canFly && this->invulnerable == rhs.invulnerable && this->canInstabuild == rhs.canInstabuild;
16 }
17 };
18}
19
20namespace std {
21 template <>
22 struct hash<lodestone::minecraft::common::player::Abilities> {
23 size_t operator()(
25 return std::hash<bool>{}(s.canFly)
26 ^ std::hash<bool>{}(s.invulnerable) << 1
27 ^ std::hash<bool>{}(s.canFly) << 2;
28 }
29 };
30}
31
32#endif // LODESTONE_GAMEMODE_H
Definition MinecraftPlayer.cpp:11
STL namespace.
bool operator==(const Abilities &rhs) const
Definition Abilities.h:14
bool invulnerable
Definition Abilities.h:11
bool canInstabuild
Definition Abilities.h:12
size_t operator()(const lodestone::minecraft::common::player::Abilities &s) const noexcept
Definition Abilities.h:23