Cuberite
A lightweight, fast and extensible game server for Minecraft
NoteEntity.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "BlockEntity.h"
5 
6 
7 
8 
9 
11 {
22 };
23 
24 
25 
26 
27 
28 // tolua_begin
29 
30 class cNoteEntity :
31  public cBlockEntity
32 {
33  // tolua_end
34 
36 
37 public: // tolua_export
38 
40 
41 
42  cNoteEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World);
43  virtual ~cNoteEntity() override {}
44 
45  // tolua_begin
46 
47  char GetPitch(void);
48  void SetPitch(char a_Pitch);
49  void IncrementPitch(void);
50  void MakeSound(void);
51 
52  // tolua_end
53 
54  // cBlockEntity overrides:
55  virtual void CopyFrom(const cBlockEntity & a_Src) override;
56  virtual bool UsedBy(cPlayer * a_Player) override;
57  virtual void SendTo(cClientHandle &) override {}
58 
59 private:
60  char m_Pitch;
61 } ; // tolua_export
62 
63 
64 
65 
void IncrementPitch(void)
Definition: NoteEntity.cpp:280
virtual void SendTo(cClientHandle &) override
Sends the packet defining the block entity to the client specified.
Definition: NoteEntity.h:57
ENUM_NOTE_INSTRUMENTS
Definition: NoteEntity.h:10
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
Definition: NoteEntity.cpp:23
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:42
void MakeSound(void)
Definition: NoteEntity.cpp:46
Definition: Player.h:27
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
Definition: NoteEntity.cpp:34
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:45
void SetPitch(char a_Pitch)
Definition: NoteEntity.cpp:271
Definition: World.h:65
#define BLOCKENTITY_PROTODEF(classname)
Place this macro in the declaration of each cBlockEntity descendant.
Definition: BlockEntity.h:9
cBlockEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
Definition: BlockEntity.h:43
char GetPitch(void)
Definition: NoteEntity.cpp:262
char m_Pitch
Definition: NoteEntity.h:60