summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockButton.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Clean up CanBeAt Functions (#5587)Alexander Harkness34 hours1-1/+1
| | | | | | | * Use cChunkDef::IsValidHeight for CanBeAt functions, and related helpers. * Add mixins for SolidSurfaceUnderneat and DirtLikeUnderneath * Minor fixes after change review.
* Allow certain blocks to be placed on top of upside-down stairs/slabs (#5468)Michal Havlíček2023-01-251-1/+36
| | | | | | | | | | | * 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
* Valid Height is now checked by vector.x12xx12x2022-04-201-1/+1
|
* Move item placement into item handlers (#5184)Tiger Wang2021-05-051-44/+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>
* Fix sending incorrect date values on world changeTiger Wang2021-04-121-1/+1
| | | | Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge.
* Mark UNREACHABLE with intrinsicsTiger Wang2021-02-201-5/+3
|
* 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>
* BlockHandler initialisation is a constant expression (#4891)Tiger Wang2020-09-201-45/+38
| | | | | | | | | | | | | * 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>
* Remove unneeded MarkDirty, SendToClients parameters of SetMetaTiger Wang2020-08-281-3/+3
| | | | | | | | 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
* Remove the redstone solid block handlerTiger Wang2020-08-081-24/+3
| | | | | | | - Remove cSolidBlockHandler * Functionality now integrated into simulator dispatcher * Fix door double open/close issues, arisen due to the top/bottom halves getting different power + Small migration to block states for redstone wire
* Toggleables: update simulators when changedTiger Wang2020-07-261-3/+24
|
* Fixed various MSVC warnings.Mattes D2020-05-061-0/+1
|
* Buttons can now be triggered by arrows. (#4670)DrButcher2020-05-031-18/+115
| | | * Buttons can now be triggered by arrows.
* Vector3 in Handlers (#4680)Mattes D2020-04-211-27/+66
| | | 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-0/+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-1/+1
|
* Refactored block-to-pickup conversion. (#4417)Mattes D2019-10-161-10/+11
|
* Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell102018-08-291-1/+1
| | | | | | | 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.
* Deal with covered switches consistently (#4161)peterbell102018-02-051-4/+1
| | | | | | | * Fixes a number of "<function>: not all control paths return a value" warnings on MSVC. * Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults. * Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message()
* cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050)Bond-0092017-11-201-11/+10
|
* Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors (#3959)Lane Kolbly2017-09-191-2/+2
| | | | | | | | | | | | | | | | | | * Made BroadcastSoundEffect take vector parameters. * Added docs for new vectored methods * Removed old code * Fixed lua warnings * Made old BroadcastSoundEffect not an override. * m_Block to m_BlockPos, used Vector3d constructor where prettier. * a_Block to a_BlockPos * Changed thunderbolt a_Block to a_BlockPos
* Changed int parameters to vector parameters in cCuboid and simulators (#3874)Lane Kolbly2017-08-171-2/+2
|
* cBlockHandler: take player by refpeterbell102017-08-011-3/+3
|
* Updated sounds and effect IDs (#3422)mathiascode2017-02-151-2/+2
|
* Reduced unnecessary block updatesLogicParrot2016-04-221-2/+2
|
* Bulk clearing of whitespaceLogicParrot2016-02-051-4/+4
|
* Reorganised the redstone simulatorTiger Wang2015-12-181-8/+18
| | | | | | -> 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-3/+4
|
* Improved mapsTiger Wang2015-07-141-7/+6
|
* Buttons no longer click on when already on. Buttons now play sound when clicking off.Hax522015-06-241-3/+23
|
* Fixed warnings in MSVC.Mattes D2015-06-021-0/+6
| | | | It complained about undefined return values or using uninitialized variables.
* Fixed a lot of warningstycho2015-05-191-1/+1
|
* Removed 0x6, 0x7 from BlockButton.Alexandre Guertin2015-03-251-5/+3
|
* Buttons can be placed on the top and on the bottom face of a blockAlexandre Guertin2015-03-091-1/+7
|
* Moved sound-configs into BlockID.h and fixed/ added loads of soundsMasy982014-09-091-6/+0
|
* Basic style fixes.madmaxoft2014-07-171-1/+1
|
* 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.
* Changed BroadcastSoundEffect function to take floating pos.Howaner2014-07-131-1/+1
|
* Redstone simulator is alerted to lever unpoweringTiger Wang2014-07-021-0/+1
| | | | | * Fixed the "fix" that broke the fix for #535, thereby fixing said issue * Fixed #535
* Minor change to buttons and leversTiger Wang2014-06-281-1/+1
| | | | | + They now detect if the block they are on occupies its voxel, instead of just being solid
* 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
| |
* | g_BlockXXX => cBlockInfo::XXXandrew2014-03-011-1/+1
|/
* Fixed compile and some warnings in MSVSTiger Wang2014-02-091-1/+1
|
* Merge branch 'master' into playerimprovementsTiger Wang2014-02-091-4/+4
|\ | | | | | | | | Conflicts: MCServer/Plugins/APIDump/APIDesc.lua
| * Improved Type safety of eBlockFaceTycho2014-02-041-4/+4
| | | | | | | | May Fix #640
* | Fixed a bunch of MSVS warningsTiger Wang2014-02-051-1/+1
|/ | | | | * Possibly also fixed some bugs with pathfinding and TNT, though unlikely
* Changed Signiture of OnDestroyedByPlayerTycho2014-02-011-1/+1
|
* Changed pointers to referencesTycho2014-02-011-7/+7
|
* 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 cBlockHandler::OnUse and dependentsTycho2014-01-261-6/+6
|
* First attempt at Implementing InterfacesTycho2014-01-251-1/+1
|
* Fixed duplication glitch with QueueSetBlockTiger Wang2013-12-061-2/+2
| | | | | | | If a coordinate was queued, and then the block there was broken, it would reappear: double items! Also now just sets meta if previous and current blocktypes matched.
* Removed unneeded CPP filesTiger Wang2013-11-291-6/+20
| | | | Also removed unneeded #include in BlockStems
* Merged master into redstonefixesTiger Wang2013-11-271-2/+5
|
* Merge remote-tracking branch 'origin/master' into foldermove2Alexander Harkness2013-11-241-6/+30
| | | | | Conflicts: GNUmakefile
* Moved source to srcAlexander Harkness2013-11-241-0/+69