summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockBed.h (unfollow)
Commit message (Collapse)AuthorFilesLines
5 daysClean up CanBeAt Functions (#5587)Alexander Harkness1-1/+1
* Use cChunkDef::IsValidHeight for CanBeAt functions, and related helpers. * Add mixins for SolidSurfaceUnderneat and DirtLikeUnderneath * Minor fixes after change review.
2021-05-14Re-implement up/down placement metadata (#5219)Tiger Wang1-2/+6
+ Use player position when placing blocks which can face up or down, seems to better correspond to Vanilla behaviour. * Fixes #4651
2021-05-05Move item placement into item handlers (#5184)Tiger Wang1-5/+0
* 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>
2021-04-12Improve bed handling robustnessTiger Wang1-17/+28
+ Boot the player out if the bed was destroyed
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.
2020-10-08Merged OnBreak with OnPlayerBreak (#4967)12xx121-1/+2
Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
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-6/+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-43/+30
* 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-05Update bed behavior (#4545)Mat1-0/+6
2020-04-21Vector3 in Handlers (#4680)Mattes D1-4/+24
Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
2020-04-16Using Super.Mattes D1-2/+2
2020-04-10Replace all single-digit hex constants with two-digit versionAlexander Harkness1-2/+2
2020-04-10Add mixins for blocks that rotate based on player yaw at placementAlexander Harkness1-20/+2
Also add observer block handler.
2019-10-28Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D1-2/+2
2019-10-16Refactored block-to-pickup conversion. (#4417)Mattes D1-15/+29
2017-11-20cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050)Bond-0091-1/+1
2017-08-25Bed piston fix (#3956)Lane Kolbly1-1/+1
* Threaded world interface into ConvertBlockToPickups * Changed how cBlockPiston::PushBlocks sets the old block to air, so that the block exists for the DropBlock call. * Removed unused a_Digger argument. * Removed incorrect comment * This time actually removed a_Digger references.
2017-08-13Replaced includes with forward declarationsLukas Pioch1-1/+1
2017-08-06Removed unneeded includes (#3902)Lukas Pioch1-2/+0
2017-08-01cBlockHandler: take player by refpeterbell101-2/+2
2017-07-07Added bed entity (#3823)Lukas Pioch1-8/+13
* Added bed entity * Export cBedEntity to lua * Set color of bed through item damage value * Added bed entity to APIDoc * NBT: Added loading and saving * Crafting recipes for the colored beds
2016-02-05Bulk clearing of whitespaceLogicParrot1-2/+2
2015-12-13allow use failures to propagate from the entity/block to the playerGargaj1-1/+1
2015-07-14Improved mapsTiger Wang1-1/+6
2015-06-22Rebased version of CodeSamuel Barney1-5/+0
2015-05-24Made -Weverything an error.tycho1-1/+1
2015-02-08Handle client 'leave bed' requestTiger Wang1-8/+17
* Fixes #1728
2014-12-24Refactored all player block placing to go through hooks.Mattes D1-1/+0
Fixes #1618.
2014-12-05BasicStyle: Added missing braces to control statements.Mattes D1-1/+4
2014-09-26Removed more unessicary includesTycho1-3/+5
2014-07-19Fixed style: spaces after commas.madmaxoft1-1/+1
2014-05-07Rename CanChangeDirtToGrass to CanDirtGrowGrassHowaner1-1/+1
2014-04-06Add CanChangeDirtToGrass function to Block Handlers.Howaner1-0/+7
2014-03-25Fixed spelling; Rotater to Rotator.narroo1-3/+3
2014-03-02ReformattedTycho1-2/+2
2014-03-01Implemented RotationsTycho1-2/+2
2014-02-27Added some Metadate rotaters using templated MixinTycho1-2/+3
2014-02-04Improved Type safety of eBlockFaceTycho1-2/+2
May Fix #640
2014-02-01Changed pointers to referencesTycho1-3/+3
2014-02-01Changed signitures of Several BLockHandler MethodsTycho1-1/+1
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-1/+1
2014-01-25First attempt at Implementing InterfacesTycho1-4/+5
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-09-13Removed place on top and side preventionsTiger Wang1-6/+0
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-1/+1
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-73/+73
2013-06-04Removed cLadder, cSign, cStairs, cTorch and cVine classes, moved their functionality into the appropriate BlockHandlers / ItemHandlersmadmaxoft@gmail.com1-14/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1555 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09Pickups are now being saved into Anvil.madmaxoft@gmail.com1-4/+4
Also changed cEntity rotation datatype to double git-svn-id: http://mc-server.googlecode.com/svn/trunk@1262 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-12Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03Moved blockticking into blockhandler classes.madmaxoft@gmail.com1-5/+5
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-24/+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-29Beds can be slept in now (it doesn't change the time though)faketruth1-61/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@911 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-29Made beds placeablefaketruth1-0/+123
Android: Updated some stuff and set default view distance lower git-svn-id: http://mc-server.googlecode.com/svn/trunk@900 0a769ca7-a7f5-676a-18bf-c427514a06d6