summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2015-05-18 09:30:43 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2015-05-18 09:30:43 +0200
commit007bac638bb732aad7ca63dd3e7a79f5dbb9d2b9 (patch)
tree8330aefdc4693303f3a944940a919d8bd2333bac /src/Blocks
parentUpdated the defaults for the overworld world generator (diff)
parentMerge pull request #2049 from mc-server/sapling-probability (diff)
downloadcuberite-007bac638bb732aad7ca63dd3e7a79f5dbb9d2b9.tar
cuberite-007bac638bb732aad7ca63dd3e7a79f5dbb9d2b9.tar.gz
cuberite-007bac638bb732aad7ca63dd3e7a79f5dbb9d2b9.tar.bz2
cuberite-007bac638bb732aad7ca63dd3e7a79f5dbb9d2b9.tar.lz
cuberite-007bac638bb732aad7ca63dd3e7a79f5dbb9d2b9.tar.xz
cuberite-007bac638bb732aad7ca63dd3e7a79f5dbb9d2b9.tar.zst
cuberite-007bac638bb732aad7ca63dd3e7a79f5dbb9d2b9.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockBed.cpp4
-rw-r--r--src/Blocks/BlockLeaves.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Blocks/BlockBed.cpp b/src/Blocks/BlockBed.cpp
index e56f4bfe0..dfa392d9b 100644
--- a/src/Blocks/BlockBed.cpp
+++ b/src/Blocks/BlockBed.cpp
@@ -14,7 +14,7 @@ void cBlockBedHandler::OnDestroyed(cChunkInterface & a_ChunkInterface, cWorldInt
NIBBLETYPE OldMeta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
Vector3i ThisPos( a_BlockX, a_BlockY, a_BlockZ);
- Vector3i Direction = MetaDataToDirection( OldMeta & 0x7);
+ Vector3i Direction = MetaDataToDirection( OldMeta & 0x3);
if (OldMeta & 0x8)
{
// Was pillow
@@ -111,7 +111,7 @@ void cBlockBedHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface
// Is foot end
VERIFY((Meta & 0x4) != 0x4); // Occupied flag should never be set, else our compilator (intended) is broken
- PillowDirection = MetaDataToDirection(Meta & 0x7);
+ PillowDirection = MetaDataToDirection(Meta & 0x3);
if (a_ChunkInterface.GetBlock(a_BlockX + PillowDirection.x, a_BlockY, a_BlockZ + PillowDirection.z) == E_BLOCK_BED) // Must always use pillow location for sleeping
{
a_WorldInterface.GetBroadcastManager().BroadcastUseBed(*a_Player, a_BlockX + PillowDirection.x, a_BlockY, a_BlockZ + PillowDirection.z);
diff --git a/src/Blocks/BlockLeaves.h b/src/Blocks/BlockLeaves.h
index bd9a7414e..8e44c94ac 100644
--- a/src/Blocks/BlockLeaves.h
+++ b/src/Blocks/BlockLeaves.h
@@ -41,7 +41,7 @@ public:
cFastRandom rand;
// Old leaves - 3 bits contain display; new leaves - 1st bit, shifted left two for saplings to understand
- if (rand.NextInt(6) == 0)
+ if (rand.NextInt(20) == 0)
{
a_Pickups.push_back(
cItem(