summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockLeaves.h (unfollow)
Commit message (Collapse)AuthorFilesLines
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-28Fortune Drops (#4932)KingCol131-15/+44
+ Implemented and standardized all clamped discrete random drops. + Changed cItems Add from push_back to emplace_back. Implement fortune for crops. + Enabled hoes to be enchanted with efficiency, silk touch and fortune. Made leaves, gravel and crops affected by fortune. Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
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-16/+10
* 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-08-28Remove unneeded MarkDirty, SendToClients parameters of SetMetaTiger Wang1-2/+2
Partially reverts #3129, whose addition of these parameters was superseded by #3149 that fixed generated leaves' metas. References: https://github.com/cuberite/cuberite/pull/4417#discussion_r334950513 e0bcd754009f16480437b2c1fa5e7fbedab31496
2020-04-17More Vector3 in cBlockHandler (#4644)Mattes D1-86/+90
* cBlockHandler.OnUpdate uses Vector3 params. Also slightly changed how block ticking works.
2019-10-16Refactored block-to-pickup conversion. (#4417)Mattes D1-17/+39
2019-08-11Fix building with clang 8.0 (#4346)Bond-0091-7/+9
2017-11-20cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050)Bond-0091-1/+1
2017-08-06Removed unneeded includes (#3902)Lukas Pioch1-1/+0
2017-06-13FastRandom rewrite (#3754)peterbell101-6/+6
2017-02-05Fixed bindings for cBlockArea:Read and Write. (#3568)Mattes D1-1/+1
The original bindings accepted nil as the World param, causing a crash.
2016-09-27Use cChunkDef::Height for Y coord comparison where applicable.Moritz Borcherding1-1/+1
2016-04-22Reduced unnecessary block updatesLogicParrot1-8/+7
2016-04-16Updated cChunk::SetMeta, fixed grass growth, reduced markDirty/setMeta usageLogicParrot1-3/+5
2016-02-05Bulk clearing of whitespaceLogicParrot1-2/+2
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-2/+2
2015-07-14Improved mapsTiger Wang1-3/+6
2015-07-01Added neighbor specification in the OnNeighborChanged() block callback.Mattes D1-2/+6
Fixes the OnNeighborChanged endless recursion with large melon / pumpkin fields. Fixes #2213.
2015-05-19Fixed a lot of warningstycho1-1/+1
2015-05-18Improved leaves a bit more.Alexander Harkness1-8/+20
Should fix #2058.
2015-05-17Fix sapling probability.Alexander Harkness1-1/+1
Probability is 5% of leaves drop a sapling. This should really be different for jungle leaves (2.5%) and the Fortune enchantment should increase the probability.
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-09-09Moved sound-configs into BlockID.h and fixed/ added loads of soundsMasy981-6/+0
2014-08-31Check range of y in HasNearLogworktycho1-1/+1
Fixes #803
2014-07-23Fix item durability.Howaner1-16/+0
Fixes #1181
2014-07-23BlockLeaves: Fixed comment style.madmaxoft1-2/+2
2014-07-19Fixed style: spaces after commas.madmaxoft1-1/+1
2014-07-17Fixed issues relating to saplings and leavesTiger Wang1-2/+8
- Removed cBlockInfo::RequiresSpecialTool * Fixes #1195 * Fixes #1201
2014-07-17Basic style fixes.madmaxoft1-4/+4
2014-07-17Normalized comments.madmaxoft1-1/+1
This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-06-08Fixed E_META_...Typos in BlockID.hnarroo1-2/+2
2014-05-09Fixed MSVC 64-bit build warnings.Mattes D1-3/+3
2014-05-08Fixed MSVC 64-bit build warnings.Mattes D1-3/+3
2014-04-23The new leaves don't decay anymore.STRWarrior1-0/+1
Fixes #792
2014-03-30Fixed a few Clang warnings in BlockHandlers.madmaxoft1-9/+10
2014-03-27Wrong if in BlockLeavesHowaner1-1/+1
2014-03-27Add new leaves to all classes.Howaner1-1/+1
2014-03-16Wrong if in BlockLeavesHowaner1-1/+1
2014-03-16Add new leaves to all classes.Howaner1-1/+2
2014-02-19Add new Trees (without Generator)Howaner1-0/+2
2014-02-02Changed Signiture of OnUpdateTycho1-3/+3
2014-02-01Changed pointers to referencesTycho1-6/+6
2014-02-01Changed signitures of Several BLockHandler MethodsTycho1-3/+3
Changed the signitures of the following to use interfaces: GetPlacementBlockTypeMeta OnPlaced OnPlacedByPlayer OnDestroyed OnNeighbourChanged NeighbourChanged OnUse CanBeAt Check
2014-01-26Refactored cBlockHandler::OnUse and dependentsTycho1-4/+4
2013-11-30Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft1-12/+13
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-184/+184
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
2013-01-27Added the HOOK_BLOCK_TO_PICKUPS hook that fires when a block is dug up and should be converted to pickups.madmaxoft@gmail.com1-1/+1
Note that cItems is used in the function signature but not yet exported in the API, TODO! git-svn-id: http://mc-server.googlecode.com/svn/trunk@1176 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03Moved blockticking into blockhandler classes.madmaxoft@gmail.com1-18/+18
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-18/+35
( 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-0/+5
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-08-28Fixed a few warningsmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@799 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-16Some code improvementslapayo94@gmail.com1-5/+5
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/+162
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