summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-07-18 17:04:01 +0200
committerHowaner <franzi.moos@googlemail.com>2014-07-18 17:04:01 +0200
commit44c944716b4fd933547d76d09bccce72e8959abb (patch)
tree990d44d0c76ade069a476f9ce17211080b19dc25 /src/Blocks
parentAdded a extra wall sign handler. (diff)
downloadcuberite-44c944716b4fd933547d76d09bccce72e8959abb.tar
cuberite-44c944716b4fd933547d76d09bccce72e8959abb.tar.gz
cuberite-44c944716b4fd933547d76d09bccce72e8959abb.tar.bz2
cuberite-44c944716b4fd933547d76d09bccce72e8959abb.tar.lz
cuberite-44c944716b4fd933547d76d09bccce72e8959abb.tar.xz
cuberite-44c944716b4fd933547d76d09bccce72e8959abb.tar.zst
cuberite-44c944716b4fd933547d76d09bccce72e8959abb.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockWallSign.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/Blocks/BlockWallSign.h b/src/Blocks/BlockWallSign.h
index 037a7bd19..b0f4015b6 100644
--- a/src/Blocks/BlockWallSign.h
+++ b/src/Blocks/BlockWallSign.h
@@ -1,6 +1,8 @@
#pragma once
+#include "BlockHandler.h"
+#include "../Entities/Player.h"
#include "Chunk.h"
@@ -8,15 +10,39 @@
class cBlockWallSignHandler :
- public cBlockSignPostHandler
+ public cBlockHandler
{
+ typedef cBlockHandler super;
public:
cBlockWallSignHandler(BLOCKTYPE a_BlockType)
- : cBlockSignPostHandler(a_BlockType)
+ : cBlockHandler(a_BlockType)
{
}
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.push_back(cItem(E_ITEM_SIGN, 1, 0));
+ }
+
+
+ virtual const char * GetStepSound(void) override
+ {
+ return "step.wood";
+ }
+
+
+ virtual void OnPlacedByPlayer(
+ cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, 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
+ {
+ a_Player->GetClientHandle()->SendEditSign(a_BlockX, a_BlockY, a_BlockZ);
+ }
+
+
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
int BlockX = (a_Chunk.GetPosX() * cChunkDef::Width) + a_RelX;