summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockStems.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Clean up CanBeAt Functions (#5587)Alexander Harkness31 hours1-1/+2
| | | | | | | * Use cChunkDef::IsValidHeight for CanBeAt functions, and related helpers. * Add mixins for SolidSurfaceUnderneat and DirtLikeUnderneath * Minor fixes after change review.
* Update Minecraft Wiki links to new domain (#5532)Spongecade2023-09-271-4/+4
| | | | | | | * Update Minecraft Wiki links to new domain * Added Spongecade to contributors * Sorted Spongecade
* Move item placement into item handlers (#5184)Tiger Wang2021-05-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * Move item placement into item handlers + Add appropriate CanBeAt checks in cPlayer::PlaceBlocks, into which all placement handlers call. * Partly addresses #5157 * Fixes #4878 * Fixes #2919 * Fixes #4629 * Fixes #4239 * Fixes #4849 Co-authored-by: changyong guo <guo1487@163.com> Co-authored-by: Xotheus <shady3300@outlook.com> Co-authored-by: Krist Pregracke <krist@tiger-scm.com> * Review fixes * Update APIDesc.lua * Rename Co-authored-by: changyong guo <guo1487@163.com> Co-authored-by: Xotheus <shady3300@outlook.com> Co-authored-by: Krist Pregracke <krist@tiger-scm.com>
* Do not fake a tool when converting to pickups (#5170)Tiger Wang2021-03-281-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.
* Add correct implementation of crops (#4802)0ddlyoko2020-11-061-60/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [FIX] Add correct implementation of seed drops. > Official percentage of drops has been implemented * Fix C++ conventions * Change "Vals" variable to "m_Vals" * [FIX] Add correct implementation of Carrots, Potatoes, Wheat & Beetroots seed * Add Fortune support with crops Add fortune support with Wheat, Carrots, Potatoes & Beetroots seeds * [FIX] Right-clicking on a grown Beetroot in survival consume 2 bone meals Fix #4805 * Add documentation for "cWorld::IsFullGrownPlantAt" method * Fix dispenser that full grown a plant > Change methods cItemDyeHandler::FertilizePlant & cItemDyeHandler::growPlantsAround to static * Display particle even if tree doesn't grow * When right-clicking on a full grown melon / pumpkin seed, no longer produce a melon / pumpkin Before this commit, when you right-click on a melon or a pumpkin seed, a melon / pumpkin block spawned. With this commit, it no longer spawns * [FIX] Do not create melon / pumpkin block when right-clicking with a bone meal This fix will prevent the creation of a melon / pumpkin block when you right-click with a bone meal on a melon / pumpkin plant - It just detect if the plant is full grown. if yes, the method "Grow" is not called - Remove IsFullGrownPlant Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)peterbell102020-10-051-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>
* Unify block entity pickup conversionTiger Wang2020-09-251-1/+1
| | | | | - Removed normal BlockHandler knowledge of block entities during conversion + Added cBlockEntity::ConvertToPickups that handles it
* BlockHandler initialisation is a constant expression (#4891)Tiger Wang2020-09-201-17/+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>
* Vector3 in Handlers (#4680)Mattes D2020-04-211-2/+2
| | | Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
* Using Super.Mattes D2020-04-161-2/+2
|
* Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D2020-04-031-1/+1
| | | | | | | | | The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change) The BlockInfo.h file was removed from Globals.h (main change) The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics) The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor) Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header. That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified. eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
* Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D2019-10-281-25/+121
|
* Refactored block-to-pickup conversion. (#4417)Mattes D2019-10-161-7/+17
|
* Removed unneeded includes (#3902)Lukas Pioch2017-08-061-1/+0
|
* Bulk clearing of whitespaceLogicParrot2016-02-051-1/+1
|
* * Logic for handling plant growth has been centralized into cBlockPlant, and all growable plants now inherit from it.Samuel Barney2015-08-191-12/+21
| | | | * Blocks now have an effect upon plant growth, just like in vanilla.
* Improved mapsTiger Wang2015-07-141-3/+6
|
* Moved sound-configs into BlockID.h and fixed/ added loads of soundsMasy982014-09-091-6/+0
|
* Fixed a few Clang warnings in BlockHandlers.madmaxoft2014-03-301-1/+2
|
* Changed Signiture of OnUpdateTycho2014-02-021-1/+1
|
* Changed pointers to referencesTycho2014-02-011-1/+1
|
* Changed signitures of Several BLockHandler MethodsTycho2014-02-011-1/+1
| | | | | | | | | | | | | Changed the signitures of the following to use interfaces: GetPlacementBlockTypeMeta OnPlaced OnPlacedByPlayer OnDestroyed OnNeighbourChanged NeighbourChanged OnUse CanBeAt Check
* Fixed melon and pumpkin growing.madmaxoft2013-12-201-1/+1
|
* Merge pull request #387 from mc-server/trapdoorsMattes D2013-11-301-1/+0
|\ | | | | Trapdoors, redstone fixes, and snow
| * Removed unneeded CPP filesTiger Wang2013-11-291-1/+0
| | | | | | | | Also removed unneeded #include in BlockStems
* | Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft2013-11-301-4/+6
|/
* Moved source to srcAlexander Harkness2013-11-241-0/+58