diff options
author | electromatter <electromatter@gmail.com> | 2015-09-22 04:44:34 +0200 |
---|---|---|
committer | electromatter <electromatter@gmail.com> | 2015-09-22 04:44:34 +0200 |
commit | a24cc0184343416eed86b208d8a2aff2b5c0892c (patch) | |
tree | 04ced91aa4a70b4c6e033fac4a2fc2e2ea206205 /src/Blocks | |
parent | added bungeecord support for protocol18x (diff) | |
parent | Merge pull request #2488 from cuberite/ChatFlag (diff) | |
download | cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.gz cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.bz2 cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.lz cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.xz cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.zst cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockGravel.h | 2 | ||||
-rw-r--r-- | src/Blocks/BlockPlant.h | 5 | ||||
-rw-r--r-- | src/Blocks/CMakeLists.txt | 13 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/Blocks/BlockGravel.h b/src/Blocks/BlockGravel.h index eb101efe9..7bd68a050 100644 --- a/src/Blocks/BlockGravel.h +++ b/src/Blocks/BlockGravel.h @@ -19,7 +19,7 @@ public: virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { cFastRandom Random; - if (Random.NextInt(30) == 0) + if (Random.NextInt(10) == 0) { a_Pickups.Add(E_ITEM_FLINT, 1, 0); } diff --git a/src/Blocks/BlockPlant.h b/src/Blocks/BlockPlant.h index 0e6aca7eb..0155dc466 100644 --- a/src/Blocks/BlockPlant.h +++ b/src/Blocks/BlockPlant.h @@ -49,13 +49,12 @@ protected: Light = Blocklight; } - // Return true if there is enough light - // Set m_ShouldDie if the base light amounts are not enough to sustain a plant + // Based on light levels, decide between growth, stay and death: if (Light > 8) { return paGrowth; } - else if (Blocklight < 9 && SkyLight < 9) + else if ((Blocklight < 9) && (SkyLight < 9)) { return paDeath; } diff --git a/src/Blocks/CMakeLists.txt b/src/Blocks/CMakeLists.txt index ed3e321d4..1c12d9fbc 100644 --- a/src/Blocks/CMakeLists.txt +++ b/src/Blocks/CMakeLists.txt @@ -9,7 +9,8 @@ SET (SRCS BlockDoor.cpp BlockHandler.cpp BlockPiston.cpp - ChunkInterface.cpp) + ChunkInterface.cpp +) SET (HDRS BlockAnvil.h @@ -54,12 +55,15 @@ SET (HDRS BlockLilypad.h BlockMelon.h BlockMobHead.h + BlockMobSpawner.h BlockMushroom.h BlockMycelium.h + BlockNetherrack.h BlockNetherWart.h BlockOre.h BlockPiston.h BlockPlanks.h + BlockPlant.h BlockPluginInterface.h BlockPortal.h BlockPressurePlate.h @@ -72,6 +76,7 @@ SET (HDRS BlockRedstoneTorch.h BlockSand.h BlockSapling.h + BlockSeaLantern.h BlockSideways.h BlockSignPost.h BlockSlab.h @@ -80,8 +85,8 @@ SET (HDRS BlockStems.h BlockStone.h BlockSugarcane.h - BlockTNT.h BlockTallGrass.h + BlockTNT.h BlockTorch.h BlockTrapdoor.h BlockTripwire.h @@ -92,8 +97,10 @@ SET (HDRS BroadcastInterface.h ChunkInterface.h ClearMetaOnDrop.h + GetHandlerCompileTimeTemplate.h MetaRotator.h - WorldInterface.h) + WorldInterface.h +) if(NOT MSVC) add_library(Blocks ${SRCS} ${HDRS}) |