summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockGrass.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-04-20Valid Height is now checked by vector.x12xx12x1-2/+2
2022-04-20Updated protocol functions to Vector3xx12xx12x1-1/+1
also added support in included functions
2021-03-28Do not fake a tool when converting to pickups (#5170)Tiger Wang1-1/+1
* When the cause of destruction was world-induced (CanBeAt check failed) there is no tool. Pass the nullptr directly to ConvertToPickups and let it handle it. * Fixes #4795 - Remove unused a_Digger parameter to ConvertToPickups.
2020-10-05Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)peterbell101-1/+1
* Fix cmake not adding Werror on clang, and _lots_ of warnings * WIP: Build fixes * Cannot make intermediate blockhandler instance * Tiger's changes * Fix BitIndex check * Handle invalid NextState values in cMultiVersionProtocol Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-09-25Grass spread: check chunk & light validity correctlyTiger Wang1-2/+2
2020-09-25Unify block entity pickup conversionTiger Wang1-1/+1
- Removed normal BlockHandler knowledge of block entities during conversion + Added cBlockEntity::ConvertToPickups that handles it
2020-09-20BlockHandler initialisation is a constant expression (#4891)Tiger Wang1-15/+8
* BlockHandler initialisation is a constant expression If we can't make it all namespaces, this is the next best I guess. + Tag handlers constexpr, const as needed + Inherit constructors * Privatise handler functions * More constexpr Co-authored-by: Alexander Harkness <me@bearbin.net>
2020-07-06Comment capitalisationTiger Wang1-2/+2
2020-07-06Use enum to represent light statesTiger Wang1-19/+34
2020-07-06Made grass spreader prettierTiger Wang1-63/+89
2020-04-21Vector3 in Handlers (#4680)Mattes D1-12/+13
Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
2020-04-17More Vector3 in cBlockHandler (#4644)Mattes D1-25/+29
* cBlockHandler.OnUpdate uses Vector3 params. Also slightly changed how block ticking works.
2020-03-17Silk touch pickaxe drops grass block (#4485)Mat1-26/+6
2019-10-28Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D1-13/+21
2019-10-16Refactored block-to-pickup conversion. (#4417)Mattes D1-3/+11
2018-08-29Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell101-2/+2
Closes #4236 CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/". #include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
2017-08-03Remove double includes part 2 (#3890)peterbell101-1/+0
2017-06-13FastRandom rewrite (#3754)peterbell101-4/+4
2016-04-16Prevented snow from killing grassLogicParrot1-2/+4
2016-04-16Updated cChunk::SetMeta, fixed grass growth, reduced markDirty/setMeta usageLogicParrot1-6/+9
2016-02-05Bulk clearing of whitespaceLogicParrot1-6/+6
2015-11-23Adjusted height validation using cChunkDef::IsValidHeight()Julian Laubstein1-1/+1
2015-07-14Improved mapsTiger Wang1-3/+18
2015-07-03Moved grabbing the light value to after the transparency check.Samuel Barney1-3/+4
2015-07-03Added missing parensSamuel Barney1-1/+1
2015-07-03Grass now only dies if it has an opaque block above it.Samuel Barney1-4/+7
Grass only spreads to a dirt block if the light level is above 4 and the block above it is transparent.
2015-06-22Rebased version of CodeSamuel Barney1-19/+16
2015-03-20Correct world height validations.Tommy Santerre1-1/+1
Unify the way we test block above the current one (Height - 1 instead of a_RelY + 1). Allow generation of world of flat height = 255
2015-03-14Fixed grass spread, closes #1743Tiger Wang1-3/+3
- Removed the salt parameter in cFastRandom functions, it wasn't doing what we thought it was following the move to C++11
2015-03-05Grass checks for sufficient light before spreadingAlexander Harkness1-1/+13
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-10-15Functions in cPluginManager get references instead of pointers.Mattes D1-1/+1
2014-09-30Code improvementsHowaner1-2/+2
2014-09-30Fixed 1.8 dirt typesHowaner1-1/+9
2014-09-26Removed more unessicary includesTycho1-2/+2
2014-09-09Moved sound-configs into BlockID.h and fixed/ added loads of soundsMasy981-6/+0
2014-08-19Code formatting fixes.Howaner1-1/+1
2014-05-07Add lava and water check to block handlers.Howaner1-2/+2
2014-05-07Rename CanChangeDirtToGrass to CanDirtGrowGrassHowaner1-2/+2
2014-04-06Remove old importHowaner1-2/+1
2014-04-06Add CanChangeDirtToGrass function to Block Handlers.Howaner1-3/+3
2014-04-03Remove old functionHowaner1-6/+0
2014-04-03Grass now grows under up-side-down slabsHowaner1-3/+12
2014-03-30Fixed a few Clang warnings in BlockHandlers.madmaxoft1-5/+5
2014-03-27Change SpreadSource prefix to ssHowaner1-1/+1
2014-03-27Add SpreadSourceHowaner1-1/+4
2014-03-01g_BlockXXX => cBlockInfo::XXXandrew1-2/+2
2014-02-02Changed Signiture of OnUpdateTycho1-1/+1
2014-01-26Removed cWorld IncludeTycho1-1/+0
2013-12-20Fixed assertion during dirt block OnUpdate()Tiger Wang1-1/+1
2013-11-30Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft1-12/+20
2013-11-30Grass doesn't spread to podzol or grassless dirt blocks.madmaxoft1-2/+3
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-10-29Grass no longer grows under water, and water on top kills it.Samuel Barney1-2/+2
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-88/+88
2013-05-09Fixed a few out-of-bounds readsmadmaxoft@gmail.com1-4/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1465 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-16Removed all E_ITEM_ symbols equivalent to E_BLOCK_, and all obsolete item and block symbols.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1218 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-26Fixed a valgrind warning in BlockDirt.madmaxoft@gmail.com1-3/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1011 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-07All blockticking is now done in cBlockHandlersmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@942 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03Moved blockticking into blockhandler classes.madmaxoft@gmail.com1-9/+9
Also slightly refactored the variable / argument names (BlockID is deprecated, use BlockType instead) git-svn-id: http://mc-server.googlecode.com/svn/trunk@921 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-01Slight refactoring of BlockHandlers - dropping unneeded virtual functionsmadmaxoft@gmail.com1-12/+19
( http://forum.mc-server.org/showthread.php?tid=434&pid=4734#pid4734 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@917 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-29Unified folder name-casingmadmaxoft@gmail.com1-0/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@902 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-11Merged in a patch for sounds by l0udPLmadmaxoft@gmail.com1-1/+6
http://forum.mc-server.org/showthread.php?tid=434&pid=4564#pid4564 git-svn-id: http://mc-server.googlecode.com/svn/trunk@858 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-21Grass blockticking fixmadmaxoft@gmail.com1-30/+32
git-svn-id: http://mc-server.googlecode.com/svn/trunk@689 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-16Some code improvementslapayo94@gmail.com1-4/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@677 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-15A new Block handling system :olapayo94@gmail.com1-0/+62
It was really a lot of work :D Took me the complete weekend :D Would really like to here your opinion on this =) The aim of this is to put all the actions for one block in one place so it is not spread around the source. (ToPickup, Action in cWorld, Action in cChunk, Action here, action there :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@671 0a769ca7-a7f5-676a-18bf-c427514a06d6