summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemBed.h
diff options
context:
space:
mode:
authorhle0 <91701075+hle0@users.noreply.github.com>2024-11-08 00:05:47 +0100
committerGitHub <noreply@github.com>2024-11-08 00:05:47 +0100
commit33b9c5dc6dae42fb6fc33283ded888a8001e5394 (patch)
tree136bb3e02c25e49feb00a06857e4145a54b6c339 /src/Items/ItemBed.h
parentRemove simple template-id from constructors for Vector3 template. (#5586) (diff)
downloadcuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar
cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.gz
cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.bz2
cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.lz
cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.xz
cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.zst
cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.zip
Diffstat (limited to 'src/Items/ItemBed.h')
-rw-r--r--src/Items/ItemBed.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Items/ItemBed.h b/src/Items/ItemBed.h
index a2e254171..77818e7c7 100644
--- a/src/Items/ItemBed.h
+++ b/src/Items/ItemBed.h
@@ -27,7 +27,10 @@ public:
auto & World = *a_Player.GetWorld();
BLOCKTYPE HeadType;
NIBBLETYPE HeadMeta;
- World.GetBlockTypeMeta(HeadPosition, HeadType, HeadMeta);
+ if (!World.GetBlockTypeMeta(HeadPosition, HeadType, HeadMeta))
+ {
+ return false;
+ }
// Vanilla only allows beds to be placed into air.
// Check if there is empty space for the "head" block: