summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-04-12 18:52:17 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-12 18:52:17 +0200
commitdd1f8fb1f5640d9f9d58098c8aefbc1c1ad308ab (patch)
treec6f025b6c90953ee24da5996193f908673382239 /src
parentAdded complete Enchanting System (diff)
downloadcuberite-dd1f8fb1f5640d9f9d58098c8aefbc1c1ad308ab.tar
cuberite-dd1f8fb1f5640d9f9d58098c8aefbc1c1ad308ab.tar.gz
cuberite-dd1f8fb1f5640d9f9d58098c8aefbc1c1ad308ab.tar.bz2
cuberite-dd1f8fb1f5640d9f9d58098c8aefbc1c1ad308ab.tar.lz
cuberite-dd1f8fb1f5640d9f9d58098c8aefbc1c1ad308ab.tar.xz
cuberite-dd1f8fb1f5640d9f9d58098c8aefbc1c1ad308ab.tar.zst
cuberite-dd1f8fb1f5640d9f9d58098c8aefbc1c1ad308ab.zip
Diffstat (limited to '')
-rw-r--r--src/UI/SlotArea.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index f76b11380..d43b91700 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -658,17 +658,20 @@ void cSlotAreaEnchanting::ClickedResult(cPlayer & a_Player)
cBlockArea Area;
Area.Read(a_Player.GetWorld(), PosX - 2, PosX + 2, PosY, PosY + 1, PosZ - 2, PosZ + 2);
- for (int x = 0; x < 7; x++)
+ for (int x = 0; x < 6; x++)
{
- for (int y = 0; y < 2; y++)
+ for (int y = 0; y < 3; y++)
{
- for (int z = 0; z < 7; z++)
+ for (int z = 0; z < 6; z++)
{
- LOG(Printf("%i", Area.GetBlockType(x, y, z)).c_str());
-
- if (Area.GetBlockType(x, y, z) == E_BLOCK_BOOKCASE)
+ if ((((x == 0) || (x == 5)) || ((z == 0) || (z == 5))) && ((y == 0) || y == 1))
{
- LOG("BookShelf");
+ LOG("%i", Area.GetRelBlockType(x, y, z));
+
+ if (Area.GetRelBlockType(x, y, z) == E_BLOCK_BOOKCASE)
+ {
+ LOG("BookShelf");
+ }
}
}
}