4jcraft/targets/minecraft/world/entity/EntitySelector.h
2026-04-01 13:27:58 -05:00

35 lines
822 B
C++

#pragma once
#include <memory>
class Entity;
class ItemInstance;
class EntitySelector {
public:
static const EntitySelector* ENTITY_STILL_ALIVE;
static const EntitySelector* CONTAINER_ENTITY_SELECTOR;
virtual ~EntitySelector() = default;
virtual bool matches(std::shared_ptr<Entity> entity) const = 0;
};
class AliveEntitySelector : public EntitySelector {
public:
bool matches(std::shared_ptr<Entity> entity) const;
};
class ContainerEntitySelector : public EntitySelector {
public:
bool matches(std::shared_ptr<Entity> entity) const;
};
class MobCanWearArmourEntitySelector : public EntitySelector {
private:
std::shared_ptr<ItemInstance> item;
public:
MobCanWearArmourEntitySelector(std::shared_ptr<ItemInstance> item);
bool matches(std::shared_ptr<Entity> entity) const;
};