1
0
Fork 0
Commit Graph

25 Commits

Author SHA1 Message Date
Mattes D 01b8ed5295
Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)
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-04-03 08:57:01 +02:00
peterbell10 cf75d7b2c5 cBlockInfo: Deprecate direct access to variables. (#4184) 2018-02-20 10:43:28 +00:00
Bond-009 d3a3c6ad2c Removed cBlockInfo.m_IsSnowable (#4105)
* Removed cBlockInfo.m_IsSnowable

* Return IsSnowable from deprecated variable binding m_IsSnowable.
2018-01-23 21:07:06 +00:00
Alexander Harkness 6309c6a97f
improve rain simulation (#4017)
* 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-12-26 21:25:57 +00:00
Alexander Harkness b5a23e5cd9 Lighting now generally consistent with vanilla (#3988)
* 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-09-07 11:56:17 +01:00
peterbell10 9472380494 cBlockInfo: Deprecate place sound 2017-08-07 09:31:36 +01:00
peterbell10 d838ef7ba4 cBlockInfo static initialisation (#3832) 2017-07-03 18:34:27 +02:00
mohe2015 32b38fb264 Anticheat fastbreak (#3411)
Added block hardness checks when breaking blocks.
2016-11-06 19:30:19 +01:00
bibo38 cb640ffea4 Spectators added (#2852) 2016-10-12 14:38:45 +02:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Gargaj 66e6589883 blockheight mechanism 2015-12-13 15:16:15 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tycho 799c96661d Fixed style 2014-09-25 15:45:39 +01:00
Tycho 6e7c0e33b5 Added first test to show the object can be created 2014-09-17 18:40:10 +01:00
Masy98 acae3c9c65 Moved sound-configs into BlockID.h and fixed/ added loads of sounds 2014-09-09 16:00:26 +02:00
STRWarrior adae2b70b1 Added cBlockInfo::CanBeTerraformed and made finishers use it
I might have forgotten some of them though
2014-07-29 22:31:31 +02:00
Tiger Wang d0e7b2f18b Merge branch 'master' into saplingsandleaves
Conflicts:
	src/Bindings/DeprecatedBindings.cpp
	src/Blocks/BlockSapling.h
2014-07-20 12:02:23 +01:00
Tiger Wang 0f8c24e04d Fixed issues relating to saplings and leaves
- Removed cBlockInfo::RequiresSpecialTool
* Fixes #1195
* Fixes #1201
2014-07-17 22:26:53 +01:00
madmaxoft 7fff12bfac Fixed spaces around single-line comments.
There should be at least two spaces in front and one space after //-style comments.
2014-07-17 19:13:23 +02:00
madmaxoft e9aecfdf11 BlockInfo is now a proper C++ singleton.
It is properly initialized before it is ever used.
2014-06-25 08:07:06 +02:00
andrew 070d483236 cBlockInfo now manages the respective cBlockHandler 2014-03-02 21:25:05 +02:00
andrew 0c87341631 GetById => Get 2014-03-02 16:24:09 +02:00
andrew 3ca56b39bc Exported cBlockInfo 2014-03-02 10:50:24 +02:00
andrew d73cdba1f6 g_BlockXXX => cBlockInfo::XXX 2014-03-01 21:34:19 +02:00
andrew 5c5502be9e Refactored global block property arrays 2014-03-01 17:04:17 +02:00