Cuberite
A lightweight, fast and extensible game server for Minecraft
BlockCommandBlock.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "BlockEntity.h"
5 
6 
7 
8 
9 
11  public cBlockEntityHandler
12 {
14 
15 public:
16 
18  super(a_BlockType)
19  {
20  }
21 
22 
23 
24 
25 
26  virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override
27  {
28  // Don't allow as a pickup:
29  return {};
30  }
31 
32 
33 
34 
35 
36  virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
37  {
38  UNUSED(a_Meta);
39  return 10;
40  }
41 } ;
42 
43 
44 
45 
Wrapper for blocks that have a cBlockEntity descendant attached to them and can be "used" by the play...
Definition: BlockEntity.h:15
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:42
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:45
cBlockCommandBlockHandler(BLOCKTYPE a_BlockType)
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity *a_BlockEntity, const cEntity *a_Digger, const cItem *a_Tool) override
Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
#define UNUSED
Definition: Globals.h:152
Byte ColourID
Definition: Globals.h:118
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
Returns the base colour ID of the block, as will be represented on a map, as per documentation: https...
Definition: Entity.h:73
cBlockEntityHandler(BLOCKTYPE a_BlockType)
Definition: BlockEntity.h:22
Definition: Item.h:36
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:234