mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-30 22:32:55 +00:00
30 lines
785 B
C++
30 lines
785 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::wstring 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::wstring& attributeName,
|
|
const std::wstring& attributeValue);
|
|
|
|
AABB* getArea() { return &m_area; }
|
|
std::wstring getName() { return m_name; }
|
|
};
|