Cuberite
A lightweight, fast and extensible game server for Minecraft
ExpBottleEntity.h
Go to the documentation of this file.
1 
2 // ExpBottleEntity.h
3 
4 // Declares the cExpBottleEntity class representing the thrown exp bottle
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  cExpBottleEntity(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 
41  void Break(Vector3d a_HitPos);
42 
43 }; // tolua_export
44 
45 
46 
47 
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
Definition: Defines.h:38
#define CLASS_PROTODEF(classname)
Definition: Entity.h:13
Definition: Entity.h:76
cExpBottleEntity(cEntity *a_Creator, Vector3d a_Pos, Vector3d a_Speed)
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...
void Break(Vector3d a_HitPos)
Breaks the bottle, fires its particle effects and sounds.
virtual void OnHitEntity(cEntity &a_EntityHit, Vector3d a_HitPos) override
Called by the physics blocktracer when the entity hits another entity.
cProjectileEntity(eKind a_Kind, cEntity *a_Creator, Vector3d a_Pos, float a_Width, float a_Height)