summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockHandler.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add block handler for huge mushroom blocks (#5143)Mat2021-03-051-2/+3
|
* Mark UNREACHABLE with intrinsicsTiger Wang2021-02-201-1/+0
|
* cChunk: don't inherit from cChunkDef (#5106)Tiger Wang2021-01-181-1/+1
|
* New pull request for daylight sensor (#5066)Aiden Neill2020-12-191-1/+2
| | | | | * Fixes #4918 Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Note Block Left Click Fix V2 (#5052)Derek Qu2020-11-261-1/+2
| | | + Add function to play note block on left click
* Adding Silverfish Spawning Blocks (#4946)12xx122020-10-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added breaking, spawning, animation * checkstyle * added undocumented API symbols * added changes suggested by @peterbell10 * added natural ore like generation * fixed spawning two silverfishes * fixed clang * fixed clang try 2 * updated comment unified offset * final clang fix * added spawning for more silverfishes if one was damaged * fixed spawning on one hit kill * fixed spawning on one hit kill fixed spawning by potion damage * fixed clang * fixed broken build * fixed broken build * I should read the error message properly fixed build now? * added small changes suggested by @peterbell10 Co-authored-by: 12xx12 <12xx12100@gmail.com>
* Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)peterbell102020-10-051-93/+89
| | | | | | | | | | | | | | | * 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>
* Fortune Drops (#4932)KingCol132020-09-281-0/+13
| | | | | | | + Implemented and standardized all clamped discrete random drops. + Changed cItems Add from push_back to emplace_back. Implement fortune for crops. + Enabled hoes to be enchanted with efficiency, silk touch and fortune. Made leaves, gravel and crops affected by fortune. Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Remove unused Temporary namespaceTiger Wang2020-09-251-701/+0
|
* Unify block entity pickup conversionTiger Wang2020-09-251-10/+2
| | | | | - Removed normal BlockHandler knowledge of block entities during conversion + Added cBlockEntity::ConvertToPickups that handles it
* Fix ice behaviour in world (#4927)12xx122020-09-241-1/+2
| | | | | + Added proper ice melting under light influence Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Limit fortune level, style fixesTiger Wang2020-09-231-7/+7
|
* Implement fortune for ores, glowstone and sea lanterns (#4897)KingCol132020-09-201-0/+16
| | | | | | | | | | | | | | | * Implemented fortune for ores, glowstone and sea lanterns (but nothing organic or flint). * Cleanup printf * Stopped playing golf, gave the Camels a FirstHump and moved the FortuneDropMult comment. Thanks for the review :). * Got rid of FortuneDropMult and replaced with Peter's massive optimization/simplification. * Fixed default lapis max droprate (8 -> 9). * Clamp max drops for non-redstone ores to 10. * Comment justifying the clamp.
* BlockHandler initialisation is a constant expression (#4891)Tiger Wang2020-09-201-276/+269
| | | | | | | | | | | | | * 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>
* Added end portal and enchanting table block entities12xx122020-09-201-3/+3
|
* BlockHandler: no dynamic allocation (#4862)Tiger Wang2020-09-171-201/+523
| | | * BlockHandler: no dynamic allocation
* OnBroken/OnPlaced are for entity actionsTiger Wang2020-08-041-44/+20
| | | | | | * Call OnPlaced/OnBroken in PlaceBlock/DigBlock - Remove unused Placing/Breaking handlers * Have the blockhandler's Check handle neighbour updating, instead of QueueTickBlockNeighbors
* Delegate simulator wakeup to cChunkTiger Wang2020-08-021-12/+8
|
* Vector3 in Handlers (#4680)Mattes D2020-04-211-8/+9
| | | Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
* More Vector3 in cBlockHandler (#4644)Mattes D2020-04-171-1/+7
| | | | | * cBlockHandler.OnUpdate uses Vector3 params. Also slightly changed how block ticking works.
* Implement glowing redstone orePeter Bell2020-04-171-187/+188
|
* fixing rotation - rel. #4625GefaketHD2020-04-111-1/+1
|
* Replace all single-digit hex constants with two-digit versionAlexander Harkness2020-04-101-1/+1
|
* Remove silly empty cBlockGlazedTerracotta classAlexander Harkness2020-04-101-1/+6
|
* Add mixins for blocks that rotate based on player yaw at placementAlexander Harkness2020-04-101-0/+2
| | | | Also add observer block handler.
* Add Terracotta handlersAlexander Harkness2020-04-101-0/+17
|
* Correct Black Glazed Terracotta block handlerAlexander Harkness2020-04-101-1/+1
|
* Updated Bookshelves drop behaviour (#4567)Xenoxis2020-03-281-0/+2
| | | | | | | | | * Updated BookShelves Drop Behaviour As described here : https://minecraft.gamepedia.com/Bookshelf#Loot * Update src/Blocks/BlockBookShelf.h * Update CONTRIBUTORS
* Fix Snow Spawn on Cobblestone Slab (#4564)Xenoxis2020-03-281-1/+1
|
* Jukebox improvements (#4537)Mat2020-03-231-1/+2
| | | | | * Add jukebox block handler Co-authored-by: peterbell10 <peterbell10@live.co.uk>
* Silk touch pickaxe drops grass block (#4485)Mat2020-03-171-1/+2
|
* Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D2019-10-281-20/+20
|
* Refactored block-to-pickup conversion. (#4417)Mattes D2019-10-161-156/+56
|
* Register vanilla blocks in BlockTypeRegistry.Mattes D2019-08-051-1/+711
|
* * Sponge: Add water absorbtion (#4333)Zach DeCook2019-06-111-0/+2
| | | | Closes #1411
* Create Ender Portal with Eyes of Ender (#4126)Zach DeCook2019-05-111-0/+2
| | | | | | | | | The algorithm was designed so All portals must be facing the center, no matter which block had the eye inserted in last. Note: Still need to create a block entity so that portals don't become invisible when you relog. Addresses part of #3445 Fixes #3695
* Fixes bed item 26 and 355 being spawned, only 355 spawns now (#4290)Rick van Schijndel2018-08-231-0/+1
|
* CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell102018-07-261-1/+1
| | | | Add check for number of empty lines between functions and fix the corresponding failures
* Concrete mixing (#4096)Zach DeCook2018-01-031-0/+2
| | | | | | | | | Adds a block handler for concrete powder and implements hardening to concrete. Concrete powder turns into concrete when: * It is next to water when it receives a block update * It falls onto a water block (even with Physics SandInstantFall=1)
* cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050)Bond-0092017-11-201-3/+3
|
* Leaves now drop with the correct meta when broken by a pickaxe with silk touch (#4034)Bond-0092017-09-191-0/+6
|
* Drop enderchest when broken by a silk touck pick (#3986)Bond-0092017-08-311-0/+6
|
* Bed piston fix (#3956)Lane Kolbly2017-08-251-2/+2
| | | | | | | | | | | | * 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.
* Changed int parameters to vector parameters in cCuboid and simulators (#3874)Lane Kolbly2017-08-171-1/+1
|
* cBlockHandler: take player by refpeterbell102017-08-011-4/+4
|
* Check for intersection between placed blocks and entities. (#3850)Lane Kolbly2017-07-281-1/+22
| | | | | | | | | | | | | * Check for intersection between placed blocks and entities. + Implemented GetPlacementCollisionBox, to permit custom placement collision boxes for blocks. * Factored block-entity placement checking into another function in cPlayer. - Removed vector min/max functions * Use GetWorld to get the world in DoesPlacingBlocksIntersectEntity. + Added block height checks, allow different cEntity subclasses to decide whether they will prevent block placement.
* Made cBlockHandler OnPlacedByPlayer call OnPlaced, made BlockRailHandler use NeighborChanged instead of OnNeighborChanged.Lane Kolbly2017-07-181-0/+1
|
* BigFlower fixes (#3826)peterbell102017-07-071-1/+1
| | | | | | | * BigFlowers fixes * Correct upper part meta * Documented parameters to DoesIgnoreBuildCollision
* Added bed entity (#3823)Lukas Pioch2017-07-071-1/+10
| | | | | | | | | | * 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
* FastRandom rewrite (#3754)peterbell102017-06-131-3/+3
|
* BlockHandlers: vertical alignment.Mattes D2017-05-091-159/+159
|
* BlockCrops: Fixed RipeMeta off-by-one error properly.Mattes D2017-05-091-4/+4
| | | | Ref.: #3691
* Deadbushes drop sticksBond-0092017-03-191-0/+1
|
* Added some blocks and items (#3503)mathiascode2017-02-141-4/+14
|
* Bulk clearing of whitespaceLogicParrot2016-02-051-5/+5
|
* More blocks that can't be mined with silktouchMathias2016-01-031-1/+28
|
* blockheight mechanismGargaj2015-12-131-0/+10
|
* Implemented the slime block dropping behaviour.bibo382015-11-071-0/+2
| | | | Fixes #2530
* * Logic for handling plant growth has been centralized into cBlockPlant, and all growable plants now inherit from it.Samuel Barney2015-08-191-0/+2
| | | | * Blocks now have an effect upon plant growth, just like in vanilla.
* Improved mapsTiger Wang2015-07-141-5/+15
|
* Added neighbor specification in the OnNeighborChanged() block callback.Mattes D2015-07-011-15/+15
| | | | | Fixes the OnNeighborChanged endless recursion with large melon / pumpkin fields. Fixes #2213.
* Rebased version of CodeSamuel Barney2015-06-221-9/+0
|
* Externalized cPrefabPiecePool self-test.Mattes D2015-06-191-0/+1
|
* Clay blocks are handled with the OreHandlerjammet2015-04-291-0/+1
|
* Fixed PolishedGranite et al crafting recipes.Mattes D2015-04-161-1/+1
| | | | Fixes #1774. Ref.: #1859
* Refactored all player block placing to go through hooks.Mattes D2014-12-241-1/+1
| | | | Fixes #1618.
* Added cocoa pod.Howaner2014-12-011-0/+2
|
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-4/+4
|
* Functions in cPluginManager get references instead of pointers.Mattes D2014-10-151-1/+1
|
* Removed unused cBlockHayBaleHandler.Howaner2014-10-071-2/+1
|
* Added default value to switch and spruce gate to fence gate handlerMasy982014-09-271-0/+1
|
* Merge pull request #1415 from Masy98/blocksMattes D2014-09-261-0/+15
|\ | | | | Added 1.8 Blocks and Items
| * Merge branch 'master' into blocksMasy982014-09-261-39/+29
| |\ | | | | | | | | | | | | | | | Conflicts: src/Items/ItemHandler.cpp src/Simulator/IncrementalRedstoneSimulator.cpp
| * | Added Sea Lantern dropsMasy982014-09-121-0/+2
| | |
| * | Fixed incorrect handlersMasy982014-09-111-3/+3
| | |
| * | Added new blocks to the BlockInfoMasy982014-09-101-0/+1
| | |
| * | Added new blocks to the BlockHandlerMasy982014-09-101-0/+12
| | |
* | | Removed more unessicary includesTycho2014-09-261-2/+2
| |/ |/|
* | Fixed minor style issues.madmaxoft2014-09-171-1/+1
| |
* | Improved cBlockHandler::DropBlockTiger Wang2014-09-131-40/+28
| |
* | Spawn exp if you break a mob spawner.Howaner2014-09-121-0/+2
|/
* Moved sound-configs into BlockID.h and fixed/ added loads of soundsMasy982014-09-091-9/+0
|
* Merge remote-tracking branch 'Hircine/Enchantments'madmaxoft2014-09-011-2/+37
|\
| * Added a_Digger checkJaume Aloy2014-08-301-28/+31
| |
| * More EnchantmentsJaume Aloy2014-08-221-1/+0
| | | | | | | | - Added Thorns and Respiration enchantments
| * Protection Enchantments, some fixesJaume Aloy2014-08-211-7/+8
| | | | | | | | | | | | | | | | - Protection echantments (fire, blast, feather falling, protection and projectile). It isn't finished, add secondary effects and optimize the code. - Removed some brackets. - Silk touch fixed.
| * Changed if in BlockHandlerJaume Aloy2014-08-191-5/+2
| |
| * FixesJaume Aloy2014-08-191-35/+35
| | | | | | | | | | | | | | | | - Changed m_TicksLeftBurning > 0 for IsOnFire() - Tried to do the changes in BlockHandler.cpp - Removed m_Creator in ArrowEntity - Added m_Enchantments in ProjectileEntity CreatorData - Added blank lines between functions
| * Changed if for switchJaume Aloy2014-08-191-11/+22
| |
| * Added more enchantments and some fixesJaume Aloy2014-08-191-4/+28
| | | | | | | | | | | | | | - Removed Debug messages - Added Punch enchantment effect - Added Silk Touch enchantment - Added Unbreaking enchantment effect
* | Code formatting fixes.Howaner2014-08-191-4/+2
|/
* Added beacon.Howaner2014-07-301-0/+1
|
* Fixed block dropsTiger Wang2014-07-241-8/+11
| | | | * Fixes #1242 (the issue addressed within)
* Merge remote-tracking branch 'origin/master' into saplingsandleavesTiger Wang2014-07-221-2/+2
|\ | | | | | | | | Conflicts: src/Defines.h
| * Style: Normalized to no spaces before closing parenthesis.madmaxoft2014-07-211-2/+2
| |
* | Merge branch 'master' into saplingsandleavesTiger Wang2014-07-201-5/+6
|\| | | | | | | | | | | Conflicts: src/Bindings/DeprecatedBindings.cpp src/Blocks/BlockSapling.h
| * Added a extra wall sign handler.Howaner2014-07-181-3/+4
| | | | | | Fixes #1119
| * Basic style fixes.madmaxoft2014-07-171-2/+2
| |
* | Fixed issues relating to saplings and leavesTiger Wang2014-07-171-35/+11
|/ | | | | | - Removed cBlockInfo::RequiresSpecialTool * Fixes #1195 * Fixes #1201
* Fixed some meta resetting bugsTiger Wang2014-07-141-1/+1
| | | | | * Fixes #1174 * Fixes #1171
* Suggestions and bug fixTiger Wang2014-07-121-7/+5
| | | | | | * Fixed hoppers pushing/pulling to/from (trapped)chests that do not form a double-chest with the chest type directly connected to said hopper; thank you, @madmaxoft
* SuggestionsTiger Wang2014-07-111-1/+2
|
* SuggestionsTiger Wang2014-07-111-5/+6
|
* Implemented trapped chests & othersTiger Wang2014-07-071-0/+1
| | | | | | | + Added trapped chests * Fixed a bunch of bugs in the redstone simulator concerning wires and repeaters * Other potential bugfixes
* Implemented tripwire(s) (hooks)Tiger Wang2014-06-281-0/+4
| | | | * Fixes #944
* Added a (disabled) block meta mirror / rotate test code.madmaxoft2014-06-231-2/+87
| | | | This will perform basic sanity checks on block metadata mirroring and rotating. cMetaRotator must disable its asserts in order for this to work.
* Merge branch 'master' into GlobalFixesHowaner2014-06-171-0/+8
|\
| * Merge pull request #1099 from Howaner/BlocksMattes D2014-06-171-0/+3
| |\ | | | | | | Glass-made blocks don't drop pickups.
| | * Glass shouldn't drop.Howaner2014-06-161-0/+3
| | |
| * | Add pressure plate handlerHowaner2014-06-171-0/+5
| |/
* / Fix hay place sound.Howaner2014-05-281-1/+2
|/
* Rename CanChangeDirtToGrass to CanDirtGrowGrassHowaner2014-05-071-2/+2
|
* Merge branch 'master' into SlabsHowaner2014-05-071-0/+2
|\
| * Merge remote-tracking branch 'upstream/master' into Enchantingdaniel09162014-04-071-76/+65
| |\
| * | first changes for enchanting (not finished)daniel09162014-01-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | - added enchanting table block handler and added it to the blockhandler - added enchanting window - drop item in the slot 0 when the player close the window - added enchanting packet (1.7 only) - some more...
* | | Merge branch 'master' into SlabsHowaner2014-04-061-0/+2
|\ \ \ | | |/ | |/|
| * | Merge pull request #840 from Howaner/NewBlocksMattes D2014-04-041-0/+2
| |\ \ | | | | | | | | Add tall flower handler.
| | * | Add tall flower handler.Howaner2014-03-281-0/+2
| | | |
* | | | Add CanChangeDirtToGrass function to Block Handlers.Howaner2014-04-061-0/+9
|/ / /
* / / Implemented lilypad placementTiger Wang2014-03-231-0/+2
|/ /
* | Merge pull request #809 from Howaner/BlockEntitysMattes D2014-03-161-0/+2
|\ \ | | | | | | More entity saving.
| * | Add anvil direction.Howaner2014-03-161-0/+2
| | |
* | | Add cakeHowaner2014-03-161-0/+2
|/ /
* | cBlockInfo-related changes from #723andrew2014-03-081-0/+1
| |
* | Add data backsending, when the Client interacts a Block and the Interact is cancelled.Howaner2014-03-051-0/+10
| |
* | cBlockInfo now manages the respective cBlockHandlerandrew2014-03-021-43/+2
| |
* | Merge pull request #700 from Howaner/GlobalFixesMattes D2014-02-201-0/+4
|\ \ | | | | | | Add new Trees (without Generator)
| * | Add new Trees (without Generator)Howaner2014-02-191-0/+4
| | |
* | | Rename SkullEntity to MobHeadEntityHowaner2014-02-191-2/+2
| | |
* | | Add Heads completelyHowaner2014-02-181-0/+2
|/ /
* | Improved Type safety of eBlockFaceTycho2014-02-041-3/+3
| | | | | | | | May Fix #640
* | Renamed cBlockQuartsHandler to cBlockQuartzHandler. Fixed not being able to place normal quartz blocks.STRWarrior2014-02-031-1/+1
| |
* | This renames the cBlockWoodHandler to cBlockSidewaysHandler, and implements a new cBlockQuartzHandler to handle the quartz pillars.STRWarrior2014-02-031-3/+6
| |
* | Fixed dark oak and acacia placement.madmaxoft2014-02-021-0/+1
| | | | | | | | Fixes #621.
* | Changed Signiture of OnUpdateTycho2014-02-021-7/+7
| |
* | Changed Signiture of OnDiggingTycho2014-02-011-1/+1
| |
* | Changed Signiture of OnDestroyedByPlayerTycho2014-02-011-1/+2
| |
* | Changed pointers to referencesTycho2014-02-011-10/+10
| |
* | Changed signitures of Several BLockHandler MethodsTycho2014-02-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Changed the signitures of the following to use interfaces: GetPlacementBlockTypeMeta OnPlaced OnPlacedByPlayer OnDestroyed OnNeighbourChanged NeighbourChanged OnUse CanBeAt Check
* | Refactored GetPlacementBlockTypeMetaTycho2014-01-261-1/+1
| |
* | Refactored cBlockHandler::OnUse and dependentsTycho2014-01-261-18/+18
| |
* | First attempt at Implementing InterfacesTycho2014-01-251-1/+1
|/
* Improved command blocksTiger Wang2014-01-191-0/+2
| | | | | | | * Their command and previous output are displayed on the client * They have a BlockHandler implementation, so you can't place blocks on them anymore + As a side effect, implemented UpdateBlockEntity
* Implented Nether Wart.STRWarrior2013-12-181-0/+2
|
* Provides a possible fix for repeater timingsTiger Wang2013-12-101-1/+1
| | | | Not completely reliable, but at least some types of clock work.
* Improved pickups spawning speed againTiger Wang2013-12-101-3/+2
|
* Readded redstone lamp handlerTiger Wang2013-12-081-0/+2
|
* Moved bindings-related to a Bindings subfolder.madmaxoft2013-12-081-1/+1
| | | | Ref.: #407
* Fixed stationary water starting fires and flowing lava not.madmaxoft2013-12-081-2/+2
|
* Lava can spawn fire.madmaxoft2013-12-041-6/+6
| | | | Settable in world.ini, lava can spawn fire to fuel blocks near it. Fix #65.
* Merge pull request #387 from mc-server/trapdoorsMattes D2013-11-301-0/+2
|\ | | | | Trapdoors, redstone fixes, and snow
| * Implemented trapdoors, fixes #43 and #105Tiger Wang2013-11-291-0/+2
| | | | | | | | Also updated redstone simulator to support it
* | Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft2013-11-301-1/+1
|/
* Moved source to srcAlexander Harkness2013-11-241-0/+465