1
0
Fork 0
Commit Graph

36 Commits

Author SHA1 Message Date
KingCol13 68776c4d59
Item frame maps (#5258)
+ Send map data when item frame spawns.
+ Add some casts to placate compiler warnings.

* size_t for array access.
* Mark chunk dirty when rotation or item in item frame is changed.
2021-07-09 18:45:53 +01:00
Tiger Wang 64442b05f8
cBlockInfo: further cleanup (#5001)
* 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-18 15:37:07 +00:00
12xx12 2d197e147e
Use pitch lookup in noteblock block entity (#4826)
- Removed the calculation in the noteblock block entity

I did the calculation in python if anyone is interested where the numbers are from

Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-09-05 16:07:01 +01:00
Mattes D c98a2d9acf Changed tree-growing functions in cWorld to use Vector3i coords. 2020-08-27 17:32:48 +01:00
Mattes D 26ac146f41
More Vector3 in cBlockHandler (#4644)
* cBlockHandler.OnUpdate uses Vector3 params.

Also slightly changed how block ticking works.
2020-04-17 10:36:37 +01:00
Mattes D c9a9b3c9d0
Bindings: Allow coercion between Vector3 subtypes. (#4646)
In manually bound functions, allows one to use any Vector3<T> value, as well as a {x, y, z} table, in Lua as any Vector3<T> parameter.
Has example in Debuggers' /vector command.
Unfortunately doesn't work in auto-bindings.
2020-04-14 16:43:21 +02:00
Mattes D a765e71325
Removed the obsolete cTracer class. (#4594) 2020-04-03 12:50:08 +00:00
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
bibo38 532731e6f4 Fixed Clang 5.0 compile errors (#4085)
* Fixed Clang 5.0 compile errors

* Fixed wrong comment

* Only disable warnings in Clang 5 or higher

* Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning

* Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork
2017-12-21 11:36:58 +00:00
peterbell10 b8dda388e0 Represent cItem::m_Lore as an AStringVector (#3882)
* Replace cItem::m_Lore with AStringVector

* Reword deprecation warning

* Fix lua bindings
2017-08-18 11:29:54 +01:00
peterbell10 9472380494 cBlockInfo: Deprecate place sound 2017-08-07 09:31:36 +01:00
peterbell10 759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
Mattes D 2c3c1f1527 Tracer replacement (#3704)
* Replaced cTracer usage with cLineBlockTracer.

* Exported new cLineBlockTracer utility functions to Lua API.
2017-05-11 13:34:36 +01:00
Mattes D ce30e3f666 Normalized Vector3 API to use the same capitalization as all else. 2016-06-10 17:59:33 +02:00
Julian Laubstein dd5201c29e Some warning fixes 2015-08-18 08:49:00 +02:00
Samuel Barney 4996e53bf5 Refactored code to use cLuaState
Fixes #2377.
2015-08-07 21:17:21 +02:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Mattes D e2a04f580a BasicStyle: Added missing braces to control statements. 2014-12-05 16:59:11 +01:00
p-mcgowan 27185dd374 clearing CheckBasicStyle.lua messages 2014-12-03 00:26:15 -08:00
Howaner c673eb590f Mark StringToMobType() as deprecated. Use cMonster:StringToMobType() instead 2014-11-29 15:40:38 +01:00
Howaner d7efece5f2 Use cLuaState's stack trace. 2014-11-17 18:01:56 +01:00
Howaner 0e491273c1 Added UpdateSign() method to DeprecatedBindings.cpp 2014-11-17 14:57:24 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tycho 6ffb7835e7 Removed a few unnessicary includes 2014-09-26 16:26:03 +01: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
madmaxoft 00c524519e Fixed style: spaces after commas. 2014-07-19 14:53:41 +02: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 2423fbf2ef Normalized comments.
This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-17 22:15:34 +02:00
Mattes D 12b82de502 Removed the bindings to set old g_BlockXXX arrays.
Those were supposed to be read-only; there's no point in writing to them anyway.
Also fixed MSVC type warnings in the code.
2014-04-03 09:26:44 +02:00
Samuel Barney eb3cc729d4 More fixes to get it to compile for me on Mac 10.9. Mostly just newline additions, but some of the unused variables were causing errors, so I wrapped them in #ifndef __APPLE__ calls, since I didn't know if they were going to be used in the future.
Also had to undefine TOLUA_TEMPLATE_BIND a couple of times.
2014-03-25 11:15:05 -06:00
madmaxoft 7fb354e8f0 Fixed MSVC warnings in DeprecatedBindings. 2014-03-02 16:34:16 +01:00
andrew 0c87341631 GetById => Get 2014-03-02 16:24:09 +02:00
andrew cff4ee11f1 Removed g_BlockXXX arrays 2014-03-02 11:30:20 +02:00
andrew 68b75f7b7a Manually exported g_Block tables 2014-03-02 11:12:29 +02:00