Cuberite
A lightweight, fast and extensible game server for Minecraft
EnderCrystal.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Entity.h"
5 
6 
7 
8 
9 
10 // tolua_begin
12  public cEntity
13 {
14  // tolua_end
15  using Super = cEntity;
16 
17 public:
18 
20 
21  cEnderCrystal(Vector3d a_Pos, bool a_ShowBottom);
22  cEnderCrystal(Vector3d a_Pos, Vector3i a_BeamTarget, bool a_DisplayBeam, bool a_ShowBottom);
23 
24  // tolua_begin
25 
26  Vector3i GetBeamTarget() const { return m_BeamTarget; }
27  void SetBeamTarget(Vector3i a_BeamTarget);
28 
30  bool DisplaysBeam() const { return m_DisplayBeam; }
31  void SetDisplayBeam(bool a_DisplayBeam);
32 
33  bool ShowsBottom() const { return m_ShowBottom; }
34  void SetShowBottom(bool a_ShowBottom);
35 
36  // tolua_end
37 
38 private:
39 
42 
43  // If the bedrock base should be displayed.
45 
46  // cEntity overrides:
47  virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
48  virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
49  virtual void KilledBy(TakeDamageInfo & a_TDI) override;
50 
51 }; // tolua_export
52 
53 
54 
55 
#define CLASS_PROTODEF(classname)
Definition: Entity.h:13
Definition: Chunk.h:36
Vector3i GetBeamTarget() const
Definition: EnderCrystal.h:26
void SetDisplayBeam(bool a_DisplayBeam)
virtual void KilledBy(TakeDamageInfo &a_TDI) override
Called when the health drops below zero.
void SetShowBottom(bool a_ShowBottom)
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
bool DisplaysBeam() const
If the EnderCrystal should send it's beam to the client and save it.
Definition: EnderCrystal.h:30
virtual void SpawnOn(cClientHandle &a_ClientHandle) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
void SetBeamTarget(Vector3i a_BeamTarget)
bool m_DisplayBeam
Definition: EnderCrystal.h:41
bool ShowsBottom() const
Definition: EnderCrystal.h:33
Vector3i m_BeamTarget
Definition: EnderCrystal.h:40
cEnderCrystal(Vector3d a_Pos, bool a_ShowBottom)
Definition: Entity.h:76
cEntity(eEntityType a_EntityType, Vector3d a_Pos, float a_Width, float a_Height)
Definition: Entity.cpp:37