Cuberite
A lightweight, fast and extensible game server for Minecraft
ThrownSnowballEntity.h
Go to the documentation of this file.
1 
2 // ThrownSnowballEntity.h
3 
4 // Declares the cThrownSnowballEntity representing a snowball that has been thrown
5 
6 
7 
8 
9 
10 #pragma once
11 
12 #include "ProjectileEntity.h"
13 
14 
15 
16 
17 
18 // tolua_begin
19 
21  public cProjectileEntity
22 {
23  // tolua_end
24 
26 
27 public: // tolua_export
28 
30 
31  cThrownSnowballEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed);
32 
33 protected:
34 
35  // cProjectileEntity overrides:
36  virtual void OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace) override;
37  virtual void OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos) override;
38  virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
39 
40 private:
41 
44 
45 } ; // tolua_export
46 
47 
48 
49 
Definition: FastNBT.h:131
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
Definition: Chunk.h:49
virtual void OnHitEntity(cEntity &a_EntityHit, Vector3d a_HitPos) override
Called by the physics blocktracer when the entity hits another entity.
virtual void OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace) override
Called by the physics blocktracer when the entity hits a solid block, the hit position and the face h...
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
Definition: Defines.h:29
Definition: Entity.h:73
#define CLASS_PROTODEF(classname)
Definition: Entity.h:11
int m_DestroyTimer
Time in ticks to wait for the hit animation to begin before destroying.
cProjectileEntity(eKind a_Kind, cEntity *a_Creator, Vector3d a_Pos, double a_Width, double a_Height)