summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockCactus.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-06-26Cactus cannot be placed on a forbidden blocks (#4767)morsmordere1-0/+34
Co-authored-by: Franklin T Kong <ftk@umich.edu> Co-authored-by: aiugai <aiugai@umich.edu> Fixes #4641 Overrode GetPlacementBlockTypeMeta for CactusBlock, which gets called before a player places the cactus block, so it returns true if the placement is allowed or false if not, in which case the cactus does not drop as a block but stays in the player's hand which is the expected behavior. Tested in Minecraft client 1.12.2.
2020-04-21Vector3 in Handlers (#4680)Mattes D1-13/+10
Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
2020-04-16Using Super.Mattes D1-3/+3
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
2019-10-28Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D1-26/+85
2019-10-16Refactored block-to-pickup conversion. (#4417)Mattes D1-7/+17
2017-07-18Break the cactus block when it grows next to a block. (#3851)Bond-0091-2/+6
2015-08-19* Logic for handling plant growth has been centralized into cBlockPlant, and all growable plants now inherit from it.Samuel Barney1-4/+21
* Blocks now have an effect upon plant growth, just like in vanilla.
2015-07-14Improved mapsTiger Wang1-3/+6
2014-09-09Moved sound-configs into BlockID.h and fixed/ added loads of soundsMasy981-6/+0
2014-03-01g_BlockXXX => cBlockInfo::XXXandrew1-1/+1
2014-02-02Changed Signiture of OnUpdateTycho1-1/+1
2014-02-01Changed pointers to referencesTycho1-1/+1
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
2013-12-22Fixed cacus breaking when next to any non-air block.STRWarrior1-1/+1
2013-12-20Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT).madmaxoft1-1/+1
2013-11-30Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft1-2/+2
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-09-13Removed place on top and side preventionsTiger Wang1-6/+0
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-88/+88
2013-03-15Huge performance boost in blockhandlers, they have direct access to chunk data when blockchecking.madmaxoft@gmail.com1-10/+27
Also fixed vines' placement. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1278 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03Moved blockticking into blockhandler classes.madmaxoft@gmail.com1-9/+15
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-6/+7
( 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-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-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-11Merged in a patch for sounds by l0udPLmadmaxoft@gmail.com1-0/+7
http://forum.mc-server.org/showthread.php?tid=434&pid=4564#pid4564 git-svn-id: http://mc-server.googlecode.com/svn/trunk@858 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-10Fixed cacti and sugarcane not being placeable on themselves (FS #234, patch submitted by STR_Warrior)madmaxoft@gmail.com1-9/+15
git-svn-id: http://mc-server.googlecode.com/svn/trunk@723 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-16Some code improvementslapayo94@gmail.com1-4/+4
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