summaryrefslogtreecommitdiffstats
path: root/src/BlockInfo.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix instant mining of blocks not being recognised, tweak anti-cheat (#4938)KingCol132020-10-021-0/+3
| | | | | | | | | | | | | | | | | | | * 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.
* Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885)KingCol132020-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Removed BiomeDef.h * Removed ChunkDef.h from Globals.h * Added to CONTRIBUTORS. * Re-added empty last line to Globals.h * Included stddef and StringUtils in BiomeDef.h * Fixed build tools compiling. It compiles, but at what cost? * Added include to src/Generating/Trees.h * Include added in ChunkGeneratorThread.h * Moved rearranged includes in LineBlockTracer.cpp * Re-arrange headers in ChunkInterface.cpp * Included ChunkDef.h in Path.h * Included ChunkDef.h in NBTChunkSerializer.h * Rearranged included and added required includes to headers. * Removed unnecessary included in StringUtils.h.
* BlockHandler initialisation is a constant expression (#4891)Tiger Wang2020-09-201-19/+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>
* BlockHandler: no dynamic allocation (#4862)Tiger Wang2020-09-171-11/+3
| | | * BlockHandler: no dynamic allocation
* Use tracing for explosions (#4845)Tiger Wang2020-09-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D2020-04-031-26/+37
| | | | | | | | | 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
* cBlockInfo: Deprecate direct access to variables. (#4184)peterbell102018-02-201-65/+64
|
* Removed cBlockInfo.m_IsSnowable (#4105)Bond-0092018-01-231-5/+12
| | | | | | * Removed cBlockInfo.m_IsSnowable * Return IsSnowable from deprecated variable binding m_IsSnowable.
* improve rain simulation (#4017)Alexander Harkness2017-12-261-5/+6
| | | | | | | | | | | * 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.
* Lighting now generally consistent with vanilla (#3988)Alexander Harkness2017-09-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* cBlockInfo: Deprecate place soundpeterbell102017-08-071-5/+0
|
* cBlockInfo static initialisation (#3832)peterbell102017-07-031-28/+38
|
* Anticheat fastbreak (#3411)mohe20152016-11-061-0/+5
| | | Added block hardness checks when breaking blocks.
* Spectators added (#2852)bibo382016-10-121-0/+5
|
* Bulk clearing of whitespaceLogicParrot2016-02-051-1/+1
|
* blockheight mechanismGargaj2015-12-131-0/+5
|
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-1/+1
|
* Fixed styleTycho2014-09-251-2/+2
|
* Added first test to show the object can be createdTycho2014-09-171-3/+28
|
* Moved sound-configs into BlockID.h and fixed/ added loads of soundsMasy982014-09-091-0/+4
|
* Added cBlockInfo::CanBeTerraformed and made finishers use itSTRWarrior2014-07-291-0/+4
| | | | I might have forgotten some of them though
* Merge branch 'master' into saplingsandleavesTiger Wang2014-07-201-1/+1
|\ | | | | | | | | | | Conflicts: src/Bindings/DeprecatedBindings.cpp src/Blocks/BlockSapling.h
| * Fixed spaces around single-line comments.madmaxoft2014-07-171-1/+1
| | | | | | | | There should be at least two spaces in front and one space after //-style comments.
* | Fixed issues relating to saplings and leavesTiger Wang2014-07-171-4/+0
|/ | | | | | - Removed cBlockInfo::RequiresSpecialTool * Fixes #1195 * Fixes #1201
* BlockInfo is now a proper C++ singleton.madmaxoft2014-06-251-14/+9
| | | | It is properly initialized before it is ever used.
* cBlockInfo now manages the respective cBlockHandlerandrew2014-03-021-0/+27
|
* GetById => Getandrew2014-03-021-10/+10
|
* Exported cBlockInfoandrew2014-03-021-3/+8
|
* g_BlockXXX => cBlockInfo::XXXandrew2014-03-011-5/+22
|
* Refactored global block property arraysandrew2014-03-011-0/+54