summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockPiston.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-08-04Corrected wakeup sequencesTiger Wang1-14/+30
* Pistons/Ice no longer need to FastSetBlock first (#4600), and the former don't drop items when broken in creative - Begin migration away from stationary fluids * Tick the chunk after applying a client's changed * Broadcast pending blocks at the end of a tick
2020-04-16Using Super.Mattes D1-2/+2
2020-04-10Add mixins for blocks that rotate based on player yaw at placementAlexander Harkness1-16/+0
Also add observer block handler.
2020-04-03New hotfix to prevent calling OnBroken (#4600)Alexander Harkness1-3/+4
* Fix stack overflow in breaking ice. Stupid fix, but it does work and is used in other places too... * Replace hotfix for pistons with better one * Fix comments in BlockBed handler
2020-04-03Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D1-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
2020-03-22Don't push blocks outside world height limits (#4516)Mat1-0/+5
* Don't push blocks outside world height limits * Style fix * Apply suggestion Co-Authored-By: peterbell10 <peterbell10@live.co.uk> * Apply suggestion Co-Authored-By: peterbell10 <peterbell10@live.co.uk> * Improvements * Add block type check back * Revert line break changes * Update BlockPiston.cpp Co-authored-by: peterbell10 <peterbell10@live.co.uk>
2019-10-16Refactored block-to-pickup conversion. (#4417)Mattes D1-52/+23
2018-08-29Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell101-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.
2018-07-25At long last... Piston animations!Tiger Wang1-59/+99
* Fixes #3198 * Fixes #57 (again lol)
2017-11-20cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050)Bond-0091-2/+2
2017-09-19Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors (#3959)Lane Kolbly1-4/+4
* 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
2017-08-25Bed piston fix (#3956)Lane Kolbly1-2/+3
* 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-03Remove double includes part 2 (#3890)peterbell101-3/+0
2017-08-01cBlockHandler: take player by refpeterbell101-4/+4
2017-07-17Allocate redstone component handlers upfrontpeterbell101-22/+22
2017-02-15Updated sounds and effect IDs (#3422)mathiascode1-2/+2
2016-10-20StyleCheck: Add "else has to be on a separate line" (#3412)mohe20151-1/+2
2016-07-06Fixed piston destroying other pistonsAltenius1-5/+9
Fixes #3251
2015-11-07Refactored code to use vectors in the cPistonHandler classbibo381-47/+37
2015-11-07Added some code improvementsbibo381-16/+36
2015-11-07Renamed GetDirectionVec into VectorFromMetaData to improve code readability.bibo381-5/+5
2015-11-07Fixed the style problems and added some commentsbibo381-6/+17
2015-11-07Extracted block moving code into a seperate methodbibo381-77/+48
2015-11-07Replaced the usage of pistonMeta with a direction vector to allow better meta value abstractionbibo381-72/+60
2015-11-07Fixed pulling/pushing of breakable blocks, which are not required to be movedbibo381-3/+20
2015-11-07Implemented the basic slime block pullingbibo381-17/+62
2015-11-07Implemented the SlimeBlock into the CanPush method to allow slimeblocks to work correctly when pushedbibo381-15/+26
2015-11-07Piston extension now works with the new recursive CanPushBlock method.bibo381-36/+41
2015-11-07Added the CanPushBlock method for the piston push check.bibo381-22/+34
This allows the recursive check for blocks to push, which is needed to implement the slime blocks into the piston system.
2015-09-25Prepared ScheduleTask for threading refactorTiger Wang1-20/+5
* Llama-ified and condensed Schedule/QueueTask - Removed hackery done with piston animations
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-2/+2
2015-06-24Buttons no longer click on when already on. Buttons now play sound when clicking off.Hax521-3/+3
2015-03-20Added cPluginLua::cResettable interface, used for scheduled tasks.Mattes D1-3/+3
This allows plugins to register objects that can "survive" the plugin unloading - they will simply bail out if the plugin is already unloaded, instead of referencing bad plugin data. Fixes #1556.
2015-03-20Removed Metavalue from Piston drops. Bugfix #1765bibo381-0/+10
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-09-26Removed more unessicary includesTycho1-0/+1
2014-09-12Fixed farmland issues.Howaner1-1/+1
2014-07-17Basic style fixes.madmaxoft1-1/+1
2014-07-17Normalized comments.madmaxoft1-2/+2
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-13Changed BroadcastSoundEffect function to take floating pos.Howaner1-2/+2
2014-07-07Implemented trapped chests & othersTiger Wang1-1/+1
+ Added trapped chests * Fixed a bunch of bugs in the redstone simulator concerning wires and repeaters * Other potential bugfixes
2014-06-01Suggestions twoTiger Wang1-3/+3
2014-05-29Changed block send queue to use vectorsTiger Wang1-6/+17
As suggested by @worktycho.
2014-05-25Hopefully fixed piston duplication issuesTiger Wang1-5/+161
* Fixes #879 * Fixes #714
2014-02-04Improved Type safety of eBlockFaceTycho1-1/+1
May Fix #640
2014-02-01Changed Signiture of OnDestroyedByPlayerTycho1-5/+5
2014-02-01Changed pointers to referencesTycho1-5/+5
2014-02-01Changed signitures of Several BLockHandler MethodsTycho1-5/+5
Changed the signitures of the following to use interfaces: GetPlacementBlockTypeMeta OnPlaced OnPlacedByPlayer OnDestroyed OnNeighbourChanged NeighbourChanged OnUse CanBeAt Check
2014-01-17Removed internal cEntity::GetRot() usage.madmaxoft1-1/+1
2014-01-16Removed obsoleted functionsTiger Wang1-1/+1
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-23Expanded one-line if statementTiger Wang1-1/+4
2013-11-22Fixed spawning pickups with piston armsTiger Wang1-0/+5
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-1/+1
2013-08-10Piston head, when removed, removes the associated piston body, too.madmaxoft1-1/+34
Fixes FS 388
2013-08-09Piston head, when removed, removes the associated piston body, too.madmaxoft1-1/+34
Fixes FS 388
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-69/+69
2013-01-20Fixed piston placement.madmaxoft@gmail.com1-1/+1
FS #293 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1160 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-12Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com1-12/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-06Completely removed the old (buggy) redstone simulator.madmaxoft@gmail.com1-7/+13
git-svn-id: http://mc-server.googlecode.com/svn/trunk@937 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03Moved blockticking into blockhandler classes.madmaxoft@gmail.com1-14/+29
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-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-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-5/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-16Some code improvementslapayo94@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@677 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-15A new Block handling system :olapayo94@gmail.com1-0/+51
It was really a lot of work :D Took me the complete weekend :D Would really like to here your opinion on this =) The aim of this is to put all the actions for one block in one place so it is not spread around the source. (ToPickup, Action in cWorld, Action in cChunk, Action here, action there :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@671 0a769ca7-a7f5-676a-18bf-c427514a06d6