+ 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.
* cBlockInfo: further cleanup
+ Use switch statements instead of lookup in dynamically initialised arrays
- Remove some deprecated bindings
* Update Stubs removing references to BlockInfoArray
* 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.
* 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>
* 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>
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
* 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
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