summaryrefslogtreecommitdiffstats
path: root/src/Generating/Prefab.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-21 10:31:07 +0200
committermadmaxoft <github@xoft.cz>2014-04-21 10:31:30 +0200
commite3ec857264a89b9d715c9fe3780f2bd29b701f42 (patch)
tree4ff04c881ad979a7e318a6d8f79512ff9673c9b4 /src/Generating/Prefab.cpp
parentAdded enchantment combining into cEnchantments. (diff)
downloadcuberite-e3ec857264a89b9d715c9fe3780f2bd29b701f42.tar
cuberite-e3ec857264a89b9d715c9fe3780f2bd29b701f42.tar.gz
cuberite-e3ec857264a89b9d715c9fe3780f2bd29b701f42.tar.bz2
cuberite-e3ec857264a89b9d715c9fe3780f2bd29b701f42.tar.lz
cuberite-e3ec857264a89b9d715c9fe3780f2bd29b701f42.tar.xz
cuberite-e3ec857264a89b9d715c9fe3780f2bd29b701f42.tar.zst
cuberite-e3ec857264a89b9d715c9fe3780f2bd29b701f42.zip
Diffstat (limited to 'src/Generating/Prefab.cpp')
-rw-r--r--src/Generating/Prefab.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Generating/Prefab.cpp b/src/Generating/Prefab.cpp
index 7d1762036..c0c9e8a13 100644
--- a/src/Generating/Prefab.cpp
+++ b/src/Generating/Prefab.cpp
@@ -23,6 +23,10 @@ static const cPrefab::sDef g_TestPrefabDef =
// Size:
7, 6, 7, // SizeX = 7, SizeY = 6, SizeZ = 7
+ // Hitbox (relative to bounding box):
+ 0, 0, 0, // MinX, MinY, MinZ
+ 6, 5, 6, // MaxX, MaxY, MaxZ
+
// Block definitions:
".: 0: 0\n" /* 0 */
"a:112: 0\n" /* netherbrick */
@@ -115,7 +119,10 @@ static cPrefab g_TestPrefab(g_TestPrefabDef);
cPrefab::cPrefab(const cPrefab::sDef & a_Def) :
m_Size(a_Def.m_SizeX, a_Def.m_SizeY, a_Def.m_SizeZ),
- m_HitBox(0, 0, 0, a_Def.m_SizeX - 1, a_Def.m_SizeY - 1, a_Def.m_SizeZ - 1),
+ m_HitBox(
+ a_Def.m_HitboxMinX, a_Def.m_HitboxMinY, a_Def.m_HitboxMinZ,
+ a_Def.m_HitboxMaxX, a_Def.m_HitboxMaxY, a_Def.m_HitboxMaxZ
+ ),
m_AllowedRotations(a_Def.m_AllowedRotations),
m_MergeStrategy(a_Def.m_MergeStrategy),
m_ShouldExtendFloor(a_Def.m_ShouldExtendFloor),