summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockFarmland.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-06-28Fix trampling for older clients and mobs (#5414)DarkoGNU1-2/+4
* Fix trampling for older clients and mobs * Style * Improve a comment * Improvements in HandleFarmlandTrampling
2022-04-26Implement relative SendPlayerMoveLook. Use it in TurnToDirt (#5413)DarkoGNU1-9/+15
* Implement relative SendPlayerMoveLook * Use relative teleport in cBlockFarmlandHandler::TurnToDirt * Static cast to UInt8. Explicit float values * Maybe explicit doubles, too * Fix TurnToDirt for some edge cases * Improve the height check in TurnToDirt * Const is good, right? * Const - the continuation
2022-04-21Implement farmland trampling (#5401)DarkoGNU1-2/+65
* Add DarkoGNU to CONTRIBUTORS * HandleFarmlandTrampling function & its docs * Fix decimal separators (, -> .) * Fix style. Adjust thresholds. Make function non-virtual * Adjust thresholds again. Prepare for fixing #5402 * Trying to fix falling through farmlands * Another style fix * Add FarmlandTramplingEnabled to world.ini * Docs for IsFarmlandTramplingEnabled * Style * Farmland trampling - handling the random chance * Trampling kinda works, very buggy * Trying to fix clang-tidy * Fix trampling * Trying to fix the 'undocumented API symbol' * Implement bearbin's suggestions * Calculate volume properly * Don't use std::pow for squaring * Improved comments * Really, should comments' style be checked?
2022-04-20Valid Height is now checked by vector.x12xx12x1-1/+1
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.
2021-01-11Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accessesTiger Wang1-2/+3
* Hopefully fixes #5094
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-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-12/+7
* 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-04-24Fix incorrect relative coords usage in farmland handler (#4690)peterbell101-2/+2
2020-04-17More Vector3 in cBlockHandler (#4644)Mattes D1-13/+23
* cBlockHandler.OnUpdate uses Vector3 params. Also slightly changed how block ticking works.
2020-04-16Using Super.Mattes D1-2/+2
2020-03-23Fix certain item drops (#4536)Mat1-2/+11
* Fix certain item drops * Revert unwanted changes * Revert unwanted changes * Revert change * Style fixes
2019-10-16Refactored block-to-pickup conversion. (#4417)Mattes D1-13/+19
2017-11-20cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050)Bond-0091-1/+1
2017-08-24Minor changes (#3909)mathiascode1-1/+1
2017-02-14Added some blocks and items (#3503)mathiascode1-0/+2
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.
2015-12-19Added HTTPS links wherever they are supported.Alexander Harkness1-6/+2
2015-08-19* Logic for handling plant growth has been centralized into cBlockPlant, and all growable plants now inherit from it.Samuel Barney1-0/+11
* Blocks now have an effect upon plant growth, just like in vanilla.
2015-08-18Some warning fixesJulian Laubstein1-1/+1
2015-07-01Added neighbor specification in the OnNeighborChanged() block callback.Mattes D1-1/+12
Fixes the OnNeighborChanged endless recursion with large melon / pumpkin fields. Fixes #2213.
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
2014-09-12Fixed farmland issues.Howaner1-44/+55
2014-08-19Code formatting fixes.Howaner1-4/+1
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-07-14Fixed some meta resetting bugsTiger Wang1-4/+7
* Fixes #1174 * Fixes #1171
2014-05-09Fixed MSVC 64-bit build warnings.Mattes D1-2/+2
2014-05-08Fixed MSVC 64-bit build warnings.Mattes D1-2/+2
2014-02-03Fixed issues with farmlandTiger Wang1-0/+2
* Fixed farmland reversion checks not taking into account carrots and potatoes * Fixed #623
2014-02-02Changed Signiture of OnUpdateTycho1-1/+1
2013-11-30Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft1-10/+13
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-10-04Optimized cBlockFarmlandHandler in wet weather.madmaxoft1-27/+26
The area isn't read at all when the weather is wet, since it isn't needed.
2013-10-04Added comparison for desert biomes.Samuel Barney1-1/+2
2013-10-04Rain now waters farmland.Samuel Barney1-0/+8
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-99/+99
2012-10-07All blockticking is now done in cBlockHandlersmadmaxoft@gmail.com1-0/+99
git-svn-id: http://mc-server.googlecode.com/svn/trunk@942 0a769ca7-a7f5-676a-18bf-c427514a06d6