Cuberite
A lightweight, fast and extensible game server for Minecraft
EnchantingTableEntity.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "BlockEntity.h"
5 
6 
7 
8 
9 
11  public cBlockEntity
12 {
14 
15 public:
16 
17  cEnchantingTableEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World, AString a_CustomName = "");
18 
19  const AString & GetCustomName() const { return m_CustomName; }
20  void SetCustomName(const AString & a_CustomName) { m_CustomName = a_CustomName; }
21 
22 private:
23 
24  // cBlockEntity overrides:
25  virtual cItems ConvertToPickups() const override;
26  virtual void CopyFrom(const cBlockEntity & a_Src) override;
27  virtual bool UsedBy(cPlayer * a_Player) override;
28  virtual void SendTo(cClientHandle & a_Client) override;
29 
31 };
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:44
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:41
std::string AString
Definition: StringUtils.h:11
cBlockEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
Definition: BlockEntity.cpp:32
virtual cItems ConvertToPickups() const override
Returns the contents of this block entity that it would drop if broken.
cEnchantingTableEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World, AString a_CustomName="")
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.
const AString & GetCustomName() const
void SetCustomName(const AString &a_CustomName)
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
Definition: Player.h:29
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:215
Definition: World.h:53