summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockComparator.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Apply new clang-formattingclang-format-codebaseAlexander Harkness2024-11-021-19/+6
|
* Allow certain blocks to be placed on top of upside-down stairs/slabs (#5468)Michal Havlíček2023-01-251-6/+11
| | | | | | | | | | | * Placing certain blocks on top of upside down slabs and stairs * remove TODO * fix style errors * IsAnyStairType helper function * Block placement on stairs and slabs
* Move item placement into item handlers (#5184)Tiger Wang2021-05-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 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-105/+84
| | | | | | | | | | | | | * 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>
* Use SimulateChunk in redstone simulatorTiger Wang2020-07-261-12/+7
| | | | | | + Improved performance, reduces bottleneck in chunkmap lookup * Stop allocating and throwing away lots of small vectors in Update/GetValidSourcePositions return values - Remove unused GetPowerLevel virtual
* Vector3 in Handlers (#4680)Mattes D2020-04-211-8/+89
| | | Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
* Using Super.Mattes D2020-04-161-2/+2
|
* Add mixins for blocks that rotate based on player yaw at placementAlexander Harkness2020-04-101-14/+2
| | | | Also add observer block handler.
* Fix certain item drops (#4536)Mat2020-03-231-2/+7
| | | | | | | | | | | * Fix certain item drops * Revert unwanted changes * Revert unwanted changes * Revert change * Style fixes
* Refactored block-to-pickup conversion. (#4417)Mattes D2019-10-161-10/+7
|
* cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050)Bond-0092017-11-201-26/+23
|
* cBlockHandler: take player by refpeterbell102017-08-011-5/+5
|
* cWorld::SendBlockTo take player by refpeterbell102017-08-011-1/+1
|
* Redstone fixes (#3285)Tiger Wang2016-07-311-0/+10
| | | | | | | | * Comparators and pistons no longer update instantly * Fixes #3168. * Consolidated comparator code * As a result, fixed an issue where GetPowerLevel didn't consider block entities behind it (only GetFrontPowerLevel did)
* Revert "Redstone fixes"Mattes D2016-07-291-10/+0
|
* Consolidated comparator codeTiger Wang2016-07-291-0/+5
| | | | | * As a result, fixed an issue where GetPowerLevel didn't consider block entities behind it (only GetFrontPowerLevel did)
* Comparators and pistons no longer update instantlyTiger Wang2016-07-291-0/+5
| | | | * Fixes #3168.
* Bulk clearing of whitespaceLogicParrot2016-02-051-2/+2
|
* Reorganised the redstone simulatorTiger Wang2015-12-181-22/+25
| | | | | | -> Many thanks to @worktycho for the idea, and @Haxi52 for the implementation plan! * Uses classes and inheritance now * Speed should be improved
* allow use failures to propagate from the entity/block to the playerGargaj2015-12-131-1/+2
|
* Improved mapsTiger Wang2015-07-141-9/+6
|
* ComparatorsTiger Wang2015-06-061-0/+79
|
* More style checking.Mattes D2015-05-091-1/+1
| | | | Spaces around some operators are checked.
* Moved sound-configs into BlockID.h and fixed/ added loads of soundsMasy982014-09-091-6/+0
|
* Normalized comments.madmaxoft2014-07-171-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.
* Fixed spelling; Rotater to Rotator.narroo2014-03-251-3/+3
|
* Merge pull request #729 from worktycho/MetaRotateMattes D2014-03-081-2/+3
|\ | | | | Alternitive solution to #503
| * ReformattedTycho2014-03-021-2/+2
| |
| * Implemented RotationsTycho2014-03-011-2/+3
| |
| * Added some Metadate rotaters using templated MixinTycho2014-02-271-2/+2
| |
* | Add SendBlockTo to cWorldInterfaceHowaner2014-03-051-1/+2
| |
* | Add data backsending, when the Client interacts a Block and the Interact is cancelled.Howaner2014-03-051-0/+6
|/
* Improved Type safety of eBlockFaceTycho2014-02-041-2/+2
| | | | May Fix #640
* Changed pointers to referencesTycho2014-02-011-5/+5
|
* 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
* Refactored GetPlacementBlockTypeMetaTycho2014-01-261-4/+4
|
* First attempt at Implementing InterfacesTycho2014-01-251-1/+1
|
* Removed internal cEntity::GetRot() usage.madmaxoft2014-01-171-1/+1
|
* Removed obsoleted functionsTiger Wang2014-01-161-1/+1
|
* Removed unneeded CPP filesTiger Wang2013-11-291-5/+19
| | | | Also removed unneeded #include in BlockStems
* Moved source to srcAlexander Harkness2013-11-241-0/+55