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 
cClientHandle
Definition: ClientHandle.h:49
cEnderCrystal::m_BeamTarget
Vector3i m_BeamTarget
Definition: EnderCrystal.h:40
cEnderCrystal::DisplaysBeam
bool DisplaysBeam() const
If the EnderCrystal should send it's beam to the client and save it.
Definition: EnderCrystal.h:30
cEntity::cEntity
cEntity(eEntityType a_EntityType, Vector3d a_Pos, float a_Width, float a_Height)
Definition: Entity.cpp:37
CLASS_PROTODEF
#define CLASS_PROTODEF(classname)
Definition: Entity.h:13
cEnderCrystal::SetDisplayBeam
void SetDisplayBeam(bool a_DisplayBeam)
Definition: EnderCrystal.cpp:55
cEnderCrystal::KilledBy
virtual void KilledBy(TakeDamageInfo &a_TDI) override
Called when the health drops below zero.
Definition: EnderCrystal.cpp:88
Entity.h
cEnderCrystal::m_ShowBottom
bool m_ShowBottom
Definition: EnderCrystal.h:44
cEnderCrystal::m_DisplayBeam
bool m_DisplayBeam
Definition: EnderCrystal.h:41
cEnderCrystal::SetShowBottom
void SetShowBottom(bool a_ShowBottom)
Definition: EnderCrystal.cpp:35
cEnderCrystal::ShowsBottom
bool ShowsBottom() const
Definition: EnderCrystal.h:33
cEnderCrystal
Definition: EnderCrystal.h:11
cEnderCrystal::Tick
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
Definition: EnderCrystal.cpp:75
cEnderCrystal::SpawnOn
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...
Definition: EnderCrystal.cpp:65
cChunk
Definition: Chunk.h:35
cEnderCrystal::cEnderCrystal
cEnderCrystal(Vector3d a_Pos, bool a_ShowBottom)
Definition: EnderCrystal.cpp:13
cEntity
Definition: Entity.h:75
cEnderCrystal::SetBeamTarget
void SetBeamTarget(Vector3i a_BeamTarget)
Definition: EnderCrystal.cpp:45
Vector3< double >
TakeDamageInfo
Definition: Entity.h:59
cEnderCrystal::GetBeamTarget
Vector3i GetBeamTarget() const
Definition: EnderCrystal.h:26