mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-26 20:23:38 +00:00
30 lines
781 B
C++
30 lines
781 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "GameRuleDefinition.h"
|
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
|
#include "minecraft/world/phys/AABB.h"
|
|
|
|
class NamedAreaRuleDefinition : public GameRuleDefinition {
|
|
private:
|
|
std::string m_name;
|
|
AABB m_area;
|
|
|
|
public:
|
|
NamedAreaRuleDefinition();
|
|
|
|
virtual void writeAttributes(DataOutputStream* dos,
|
|
unsigned int numAttributes);
|
|
|
|
virtual ConsoleGameRules::EGameRuleType getActionType() {
|
|
return ConsoleGameRules::eGameRuleType_NamedArea;
|
|
}
|
|
|
|
virtual void addAttribute(const std::string& attributeName,
|
|
const std::string& attributeValue);
|
|
|
|
AABB* getArea() { return &m_area; }
|
|
std::string getName() { return m_name; }
|
|
};
|