File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 44#include " lib/UUID.hpp"
55
66#include < string>
7+ #include < utility>
78
89struct vec3 {
910 double x, y, z;
@@ -18,9 +19,21 @@ class Entity {
1819 vec3 _position;
1920 rot _rotation;
2021 UUID _entityId;
21- std::string _entityName ;
22+ std::string _entityType ;
2223 std::string _dimensionName;
2324 // Status Flag
25+ public:
26+ explicit Entity (UUID id, std::string entityType, std::string dimensionName)
27+ : _entityId(id), _entityType(std::move(entityType)), _dimensionName(std::move(dimensionName)) {}
28+ virtual ~Entity () = default ;
29+
30+ const std::string& getEnityType () const { return _entityType; }
31+
32+ vec3 getPosition () const { return _position; }
33+ void setPosition (vec3 position) { _position = position; }
34+
35+ rot getRotation () const { return _rotation; }
36+ void setRotation (rot rotation) { _rotation = rotation; }
2437};
2538
2639#endif
Original file line number Diff line number Diff line change @@ -45,15 +45,6 @@ class PlayerConfig {
4545 void setServerListings (bool serverListings) { _allowServerListings = serverListings; }
4646};
4747
48- struct vec3 {
49- double x, y, z;
50- };
51-
52- class PlayerEntity {
53- private:
54- vec3 _position;
55- };
56-
5748class Player {
5849 private:
5950 std::string _name;
You can’t perform that action at this time.
0 commit comments