LeviLamina
Loading...
Searching...
No Matches
ActorCategory.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5enum class ActorCategory : uint {
6 // bitfield representation
7 None = 0,
8 Player = 1u << 0,
9 Mob = 1u << 1,
10 Monster = 1u << 2,
11 Humanoid = 1u << 3,
12 Animal = 1u << 4,
13 WaterSpawning = 1u << 5,
14 Pathable = 1u << 6,
15 Tamable = 1u << 7,
16 Ridable = 1u << 8,
17 Item = 1u << 10,
18 Ambient = 1u << 11,
19 Villager = 1u << 12,
20 Arthropod = 1u << 13,
21 Undead = 1u << 14,
22 Zombie = 1u << 15,
23 Minecart = 1u << 16,
24 Boat = 1u << 17,
25 NonTargetable = 1u << 18,
26 Predictable = 1u << 19,
27 HumanoidMonster = Monster | Humanoid,
28 WaterAnimal = Animal | WaterSpawning,
29 TamableAnimal = Animal | Tamable,
30 EvocationIllagerMonster = Monster | Humanoid | Villager,
31 UndeadMob = Monster | Undead,
32 ZombieMonster = Monster | Zombie,
33 MinecartRidable = Ridable | Minecart,
34 BoatRideable = Ridable | Boat,
35};
36
37constexpr ActorCategory operator|(ActorCategory a, ActorCategory b) {
38 using integer_type = std::underlying_type_t<ActorCategory>;
39 return static_cast<ActorCategory>(static_cast<integer_type>(a) | static_cast<integer_type>(b));
40}
41constexpr ActorCategory operator&(ActorCategory a, ActorCategory b) {
42 using integer_type = std::underlying_type_t<ActorCategory>;
43 return static_cast<ActorCategory>(static_cast<integer_type>(a) & static_cast<integer_type>(b));
44}
Definition Animal.h:19
Definition Boat.h:21
Definition HumanoidMonster.h:14
Definition Item.h:66
Definition Minecart.h:25
Definition Mob.h:47
Definition Monster.h:20
Definition Player.h:123
Definition Villager.h:14
Definition WaterAnimal.h:15
Definition Zombie.h:20