summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-07-07 09:31:45 +0200
committerGitHub <noreply@github.com>2017-07-07 09:31:45 +0200
commit885d8287125439047ca2318f8e349b8da279e612 (patch)
tree2f54b688dba0f49b64544d3c1220a16a6936cd6f /src/Chunk.cpp
parentChanged Lua plugins to only execute files ending in .lua (#3831) (diff)
downloadcuberite-885d8287125439047ca2318f8e349b8da279e612.tar
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.gz
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.bz2
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.lz
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.xz
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.zst
cuberite-885d8287125439047ca2318f8e349b8da279e612.zip
Diffstat (limited to '')
-rw-r--r--src/Chunk.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 99f643437..8a13fd20e 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -13,6 +13,7 @@
#include "zlib/zlib.h"
#include "Defines.h"
#include "BlockEntities/BeaconEntity.h"
+#include "BlockEntities/BedEntity.h"
#include "BlockEntities/BrewingstandEntity.h"
#include "BlockEntities/ChestEntity.h"
#include "BlockEntities/CommandBlockEntity.h"
@@ -1404,6 +1405,7 @@ void cChunk::CreateBlockEntities(void)
switch (BlockType)
{
case E_BLOCK_BEACON:
+ case E_BLOCK_BED:
case E_BLOCK_TRAPPED_CHEST:
case E_BLOCK_CHEST:
case E_BLOCK_COMMAND_BLOCK:
@@ -1537,6 +1539,7 @@ void cChunk::SetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType,
switch (a_BlockType)
{
case E_BLOCK_BEACON:
+ case E_BLOCK_BED:
case E_BLOCK_TRAPPED_CHEST:
case E_BLOCK_CHEST:
case E_BLOCK_COMMAND_BLOCK:
@@ -2265,6 +2268,15 @@ bool cChunk::DoWithBeaconAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBeaconCal
+bool cChunk::DoWithBedAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBedCallback & a_Callback)
+{
+ return GenericDoWithBlockEntityAt<cBedEntity,
+ E_BLOCK_BED
+ >(a_BlockX, a_BlockY, a_BlockZ, a_Callback);
+}
+
+
+
bool cChunk::DoWithBrewingstandAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBrewingstandCallback & a_Callback)
{