Cuberite
A lightweight, fast and extensible game server for Minecraft
ItemCauldron.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "ItemHandler.h"
5 
6 
7 
8 
9 
11  public cItemHandler
12 {
13 public:
14  cItemCauldronHandler(int a_ItemType) :
15  cItemHandler(a_ItemType)
16  {
17  }
18 
19 
20  virtual bool IsPlaceable(void) override
21  {
22  return true;
23  }
24 
25 
27  cWorld * a_World, cPlayer * a_Player,
28  int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
29  int a_CursorX, int a_CursorY, int a_CursorZ,
30  BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
31  ) override
32  {
33  a_BlockType = E_BLOCK_CAULDRON;
34  a_BlockMeta = 0;
35  return true;
36  }
37 } ;
38 
39 
40 
41 
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:42
virtual bool GetPlacementBlockTypeMeta(cWorld *a_World, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) override
Called when the player right-clicks with this item and IsPlaceable() == true, and OnPlayerPlace() is ...
Definition: ItemCauldron.h:26
Definition: Player.h:27
virtual bool IsPlaceable(void) override
Blocks simply get placed.
Definition: ItemCauldron.h:20
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:45
Definition: World.h:65
cItemCauldronHandler(int a_ItemType)
Definition: ItemCauldron.h:14
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
Definition: Defines.h:29