Program Listing for File Entity.h

Return to documentation for file (libs/mcg/include/mcg/Entity.h)

#pragma once
#include "Pos.h"
#include <nlohmann/json.hpp>

class Entity {

  private:
    std::string mobType;
    std::vector<std::string> equipment;
    Pos pos;

  public:
    std::string getMobType();

    int getX();

    int getY();

    int getZ();

    void setX(int x);

    void setY(int y);

    void setZ(int z);

    void shiftX(int shift);

    void shiftY(int shift);

    void shiftZ(int shift);

    void shift(int shiftX, int shiftY, int shiftZ);



    //===========================================
    // Minecraft entity equipment-related methods
    //===========================================

    std::string getHelmet();

    std::string getChestplate();

    std::string getLeggings();

    std::string getBoots();

    std::string getWeapon();

    void setHelmet(std::string helmet);

    void setChestplate(std::string chestplate);

    void setLeggings(std::string leggings);

    void setBoots(std::string boots);

    void setWeapon(std::string weapon);


    void setMobType(std::string mobType);

    void setAllEquipment(std::vector<std::string>& equipment);

    void virtual toSemanticMapJSON(nlohmann::json& json_base);

    void virtual toLowLevelMapJSON(nlohmann::json& json_base);

    Entity(std::string mobType,
           Pos& pos,
           std::string helmet = "none",
           std::string chestplate = "none",
           std::string leggings = "none",
           std::string boots = "none",
           std::string weapon = "none");

    virtual ~Entity();
};