summaryrefslogtreecommitdiffstats
path: root/src/BlockInfo.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-06-27Double slabs are not transparent blocksAlexander Harkness1-4/+0
Fixes #4630
2021-05-05Move item placement into item handlers (#5184)Tiger Wang1-0/+11
* 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-02-07Explodinator performance optimisationsTiger Wang1-121/+0
Thanks @lixfel (#4246)
2020-11-28BlockInfo: float-equal for Clang onlyTiger Wang1-0/+4
2020-11-06Players are no longer kicked when clicking on bedrock (#5023)Tiger Wang1-48/+18
* Players are no longer kicked when clicking on bedrock * Fixes #5022
2020-11-02Rein in light spread by correcting falloff valueTiger Wang1-26/+2
* Fixes #5018
2020-10-24TNT Changes (#4970)KingCol131-0/+9
+ Make TNT drop pickups, change a few comments. + Give each ray random intensity, instead of each explosion. * Use direction instead of destination, rewrite for pairs of edges.
2020-10-18cBlockInfo: further cleanup (#5001)Tiger Wang1-951/+1033
* cBlockInfo: further cleanup + Use switch statements instead of lookup in dynamically initialised arrays - Remove some deprecated bindings * Update Stubs removing references to BlockInfoArray
2020-10-02Fix instant mining of blocks not being recognised, tweak anti-cheat (#4938)KingCol131-16/+16
* Tried to fix a small issue... Ended up rewriting a bunch of god awful, opaque code with no source and no sense. Who names a function GetPlayerRelativeBlockHardness??? It's gone now. We're safe again. * Testing anti-cheat. * Tidy up debug logging. * Remove empty member declaration. * Rewrite GetDigSpeed slightly for better readability. * GetMiningProgressPerTick now returns 1 when instantly mined. Fixed hasily written typo. * Comment style and typo fixes.
2020-09-20BlockHandler initialisation is a constant expression (#4891)Tiger Wang1-10/+0
* 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-09-17Fixed leaves and wheat not breakable with piston (#4882)Elias Thomson1-1/+4
* Fixed leaves and wheat not breakable with piston * Fixed alpha-sort * Add beetroots Co-authored-by: Elias Thomson <fiv.pids@gmail.com>
2020-09-17BlockHandler: no dynamic allocation (#4862)Tiger Wang1-11/+9
* BlockHandler: no dynamic allocation
2020-09-15Fixed doors not breakable by piston (#4869)Elias Thomson1-0/+5
Co-authored-by: Elias Thomson <dev@eliasthomson.com>
2020-09-12Use tracing for explosions (#4845)Tiger Wang1-0/+121
* TNT: Implement tracing algorithm + Add intensity tracing * Fix iterating over all players to SendExplosion, even those not in range * Implemented TNT entity interaction * Fixed misaligned destruction tracing * Finalise TNT algorithm - Remove BlockArea and just use chunks Using SetBlock makes it so that we can update everything properly, and does appear to be faster. * BlockInfo learns about explosion attentuation * Rename Explodinator parameters * TNT: pull block destruction into common function Co-authored-by: Alexander Harkness <me@bearbin.net>
2020-04-10Change stained clay hardness valueAlexander Harkness1-1/+1
2020-04-03Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D1-1/+432
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-28Fix Snow Spawn on Cobblestone Slab (#4564)Xenoxis1-0/+1
2019-12-05Correct block transparenciesPeter Bell1-0/+5
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell101-0/+3
Add check for number of empty lines between functions and fix the corresponding failures
2018-06-24Update m_IsSolid assignments in BlockInfo (#4167)Alexander Harkness1-0/+7
Fixes #4166
2018-04-02* Block Info: glazed terracotta and concrete hardness/solid voxel status (#4205)Zach DeCook1-0/+35
2018-01-23Removed cBlockInfo.m_IsSnowable (#4105)Bond-0091-85/+3
* Removed cBlockInfo.m_IsSnowable * Return IsSnowable from deprecated variable binding m_IsSnowable.
2017-12-26improve rain simulation (#4017)Alexander Harkness1-7/+18
* Uses vanilla logic to decide which blocks rain falls through. * Rain falls infinitely above the world, and stops at y=0. * Entities will now be extinguished if they are under rain-blocking blocks, and fire will now be extinguished by rain similarly. * Create IsWeatherWetAtXYZ to identify wetness at a particular location. * Use new code for enderman rain detection. * Fixes issue #916 * Disable warnings for global constructors in the fire simulator.
2017-09-07Lighting now generally consistent with vanilla (#3988)Alexander Harkness1-12/+57
* Lighting now generally consistent with vanilla Skylight is now dispersed by some blocks, instead of passing through unimpeded. Some blocks which were not marked as transparent are now marked as such. Water and other such blocks now attenuate light with the correct intensity. Generally changes were based on documentation in the Minecraft Wiki: https://minecraft.gamepedia.com/Opacity#On_block_light , however during play-testing on vanilla lava was found not to attenuate sky or block-light so the attenuation was removed. This fixes #3849 * Add API documentation for IsSkylightDispersant * Rename m_SkylightDispersant to m_IsSkylightDispersant * Update comment for m_Transparent property of Blocks
2017-08-03Remove double includes part 2 (#3890)peterbell101-1/+0
2017-07-03cBlockInfo static initialisation (#3832)peterbell101-883/+881
2017-03-21Added blocks that can be washed away by water (#3637)Bond-0091-0/+1
2017-03-16Allow mobs to walk through dead_bush (#3623)willi123yao1-0/+1
Fixes #3618.
2017-02-15Updated sounds and effect IDs (#3422)mathiascode1-191/+0
2017-02-14Added some blocks and items (#3503)mathiascode1-1/+121
2016-11-06Anticheat fastbreak (#3411)mohe20151-0/+199
Added block hardness checks when breaking blocks.
2016-10-12Spectators added (#2852)bibo381-0/+9
2016-04-16Updated cChunk::SetMeta, fixed grass growth, reduced markDirty/setMeta usageLogicParrot1-1/+0
2015-12-13blockheight mechanismGargaj1-0/+21
2015-11-07Implemented the slime block dropping behaviour.bibo381-0/+1
Fixes #2530
2015-07-14Improved mapsTiger Wang1-13/+13
2015-07-03Farmland is now listed as an opaque block.Samuel Barney1-2/+1
Changed spread light falloff for farmland to what it was originally.
2015-06-22Rebased version of CodeSamuel Barney1-1/+1
2015-05-24Made -Weverything an error.tycho1-1/+1
2014-12-13FixesHowaner1-2/+0
2014-12-01Added cocoa pod.Howaner1-0/+1
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-2/+2
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-2/+2
2014-10-01Added missing 1.8 blocks, E_METAs and soundsMasy981-1/+10
2014-09-30Improved torch handlerTiger Wang1-0/+1
2014-09-30Fixed iron trapdoorsHowaner1-0/+1
2014-09-27Fixed minor style issues.madmaxoft1-1/+1
2014-09-17Added first test to show the object can be createdTycho1-42/+0
2014-09-12Fixed block place sounds.Howaner1-13/+13
2014-09-11Added barrier blockMasy981-1/+5
2014-09-10Fixed typoMasy981-1/+1
2014-09-10Added new blocks to the BlockInfoMasy981-0/+63
2014-09-09Moved sound-configs into BlockID.h and fixed/ added loads of soundsMasy981-0/+167
2014-08-07Fixed nether wart digging.Howaner1-0/+1
Fixes #1265
2014-07-29Added soulsand to the terraformed list.STRWarrior1-0/+1
2014-07-29Added cBlockInfo::CanBeTerraformed and made finishers use itSTRWarrior1-0/+21
I might have forgotten some of them though
2014-07-23Fix item durability.Howaner1-0/+1
Fixes #1181
2014-07-20Bug and crash fixesTiger Wang1-0/+1
* Fixes end portals' solidity * Fixed crashes to do with multithreading and removing an entity from the wrong world * Fixed crashes due to bad merge * Fixed crashes due to an object being deleted twice * Simplified cWorld::Start() and added comments to configuration files
2014-07-18Monster fixesTiger Wang1-4/+0
* Fixes #1203 * Fixes #627
2014-07-17Fixed issues relating to saplings and leavesTiger Wang1-46/+0
- Removed cBlockInfo::RequiresSpecialTool * Fixes #1195 * Fixes #1201
2014-07-15Removed Stairs and carpet from the "isSolid" list to prevent mobs falling through them.Masy981-1/+0
2014-07-15Removed Stairs and carpet from the "isSolid" list to prevent mobs falling through them.Masy981-12/+0
2014-07-15Added Brick fence to m_TransparentMasy981-0/+1
2014-07-15Added various missing blocks in the lists in BlockInfo.cppMasy981-63/+214
2014-07-09Fixed arrow collection animationTiger Wang1-1/+0
* Fixed piston extension non-solidness
2014-07-07Implemented trapped chests & othersTiger Wang1-0/+3
+ Added trapped chests * Fixed a bunch of bugs in the redstone simulator concerning wires and repeaters * Other potential bugfixes
2014-06-28Implemented tripwire(s) (hooks)Tiger Wang1-0/+9
* Fixes #944
2014-06-25BlockInfo is now a proper C++ singleton.madmaxoft1-367/+365
It is properly initialized before it is ever used.
2014-06-24Fixed BlockInfo initialization.madmaxoft1-15/+6
Now cBlockInfo is initialized in the getter, instead of "at any time during startup", which included "after it was already needed".
2014-06-19Nullify deleted pointers.archshift1-0/+1
2014-06-17Add pressure plate handlerHowaner1-0/+2
2014-04-30Ladders set as transparent.madmaxoft1-0/+1
2014-04-06Add CanChangeDirtToGrass function to Block Handlers.Howaner1-0/+10
2014-03-28Some fixes to lilypadsTiger Wang1-1/+2
* Fixed placement on lava * Fixed placement on side of blocks * Fixed placement through blocks + Added washing-away of pads + Added ice as a block that fully occupies its voxel
2014-03-16Add new leaves to all classes.Howaner1-0/+1
2014-03-08Fixed issues with int vs size_t and a few other warningsTycho1-2/+0
2014-03-08cBlockInfo-related changes from #723andrew1-0/+9
2014-03-02Removed if conditionandrew1-4/+1
2014-03-02cBlockInfo now manages the respective cBlockHandlerandrew1-0/+22
2014-03-02GetById => Getandrew1-3/+3
2014-03-01g_BlockXXX => cBlockInfo::XXXandrew1-5/+5
2014-03-01Refactored global block property arraysandrew1-0/+423