aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/EntitySelector.h
blob: 5cba9e84e1bda95009bcb8ef27adcff8853f518f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

class EntitySelector
{
public:
	static const EntitySelector *ENTITY_STILL_ALIVE;
	static const EntitySelector *CONTAINER_ENTITY_SELECTOR; 

	virtual bool matches(shared_ptr<Entity> entity) const = 0;
};

class AliveEntitySelector : public EntitySelector
{
public:
	bool matches(shared_ptr<Entity> entity) const;
};

class ContainerEntitySelector : public EntitySelector
{
public:
	bool matches(shared_ptr<Entity> entity) const;
};

class MobCanWearArmourEntitySelector : public EntitySelector
{
private:
	shared_ptr<ItemInstance> item;

public:
	MobCanWearArmourEntitySelector(shared_ptr<ItemInstance> item);
	bool matches(shared_ptr<Entity> entity) const;
};