Cuberite
A lightweight, fast and extensible game server for Minecraft
Floater.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
11 class cFloater :
12  public cEntity
13 {
14  // tolua_end
15 
16  using Super = cEntity;
17 
18 public: // tolua_export
19 
21 
22  cFloater(Vector3d a_Pos, Vector3d a_Speed, UInt32 a_PlayerID, int a_CountDownTime);
23 
24  virtual void SpawnOn(cClientHandle & a_Client) override;
25  virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
26 
27  // tolua_begin
28  bool CanPickup(void) const { return m_CanPickupItem; }
29  UInt32 GetOwnerID(void) const { return m_PlayerID; }
30  UInt32 GetAttachedMobID(void) const { return m_AttachedMobID; }
31  Vector3d GetBitePos(void) const { return m_BitePos; }
32  // tolua_end
33 
34 protected:
35  // Position
37 
38  // Position just before the floater gets pulled under by a fish
40 
41  // Bool needed to check if you can get a fish.
43 
44  // Countdown times
47 
48  // Entity IDs
51 } ; // tolua_export
#define CLASS_PROTODEF(classname)
Definition: Entity.h:13
unsigned int UInt32
Definition: Globals.h:157
Definition: Chunk.h:36
Definition: Entity.h:76
cEntity(eEntityType a_EntityType, Vector3d a_Pos, float a_Width, float a_Height)
Definition: Entity.cpp:37
Vector3d m_ParticlePos
Definition: Floater.h:36
virtual void SpawnOn(cClientHandle &a_Client) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
Definition: Floater.cpp:93
UInt32 GetOwnerID(void) const
Definition: Floater.h:29
UInt32 GetAttachedMobID(void) const
Definition: Floater.h:30
UInt32 m_AttachedMobID
Definition: Floater.h:50
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
Definition: Floater.cpp:102
int m_CountDownTime
Definition: Floater.h:46
Vector3d GetBitePos(void) const
Definition: Floater.h:31
cFloater(Vector3d a_Pos, Vector3d a_Speed, UInt32 a_PlayerID, int a_CountDownTime)
Definition: Floater.cpp:77
Vector3d m_BitePos
Definition: Floater.h:39
int m_PickupCountDown
Definition: Floater.h:45
UInt32 m_PlayerID
Definition: Floater.h:49
bool m_CanPickupItem
Definition: Floater.h:42
bool CanPickup(void) const
Definition: Floater.h:28