1
0
Fork 0
Commit Graph

31 Commits

Author SHA1 Message Date
12xx12 3daf253b7f
Some emplace_back replacements (#5149)
* replace push_back with emplace_back when a new object was created in the function call
2021-03-07 16:31:43 +00:00
Tiger Wang 93adbdce9a
Use tracing for explosions (#4845)
* 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-09-12 18:57:44 +00:00
Tiger Wang 225c2fa9f6 Always use relative coordinates in AddBlock
+ Pass block, use relatives
* Fixes everything immediately converting abs back to rel and getting block, when these data were already available
2020-08-02 15:52:06 +01:00
Tiger Wang 99856df686 Add WakeUp/AddBlock distinction
* WakeUp is for singular changes (block breaking for example). The simulator should check blocks around the position and discover other affected blocks as it sees fit
* AddBlock is for when you know a whole area is to be updated; chunk loading, or area wakeups for example
+ Prepares for correct handling of destroyed blocks after removal of SolidBlockHandler in the redstone simulator
2020-08-02 15:52:06 +01:00
Mattes D bdedab15c9
Falling blocks can now be spawned at any position. (#4620)
* Falling blocks can now be spawned at any position.

* Added a /cake command to Debuggers that throws a cake in a nice slow arc.

* Fixed regular falling blocks.
2020-04-09 20:25:20 +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
Mattes D 221cc4ec5c
Refactored block-to-pickup conversion. (#4417) 2019-10-16 10:06:34 +02:00
peterbell10 4727ed2084 Add a formatting function for Vector3 (#4282)
* Vector3: Add custom fmt compatible formatter.

* cLuaState: Add fmt version of ApiParamError

* Use vector formatting in manual bindings

* Always log vectors with FLOG
2018-09-24 21:33:39 +01:00
peterbell10 cdd8e42587
cWorld: Manually bind deprecated broadcast functions (#4265)
Ref: https://github.com/cuberite/cuberite/pull/4264#discussion_r204769193
2018-07-27 00:12:41 +01:00
Zach DeCook 68fc28857f Concrete mixing (#4096)
Adds a block handler for concrete powder and implements hardening to concrete.
Concrete powder turns into concrete when:
* It is next to water when it receives a block update
* It falls onto a water block (even with Physics SandInstantFall=1)
2018-01-03 16:33:31 +00:00
Tiger Wang 72d7027861 Merge pull request #3489 from cuberite/EntityOwnership
* Changed entity ownership model to use smart pointers
2017-08-18 11:17:56 +01:00
Lane Kolbly 7bdbfad1bb Changed int parameters to vector parameters in cCuboid and simulators (#3874) 2017-08-17 15:48:38 +02:00
Tiger Wang 4ef47aed62 Changed entity ownership model to use smart pointers 2017-08-07 19:24:16 +01:00
peterbell10 759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
Bond-009 7fd3899796 Added 1.12 blocks (#3760) 2017-06-30 10:46:58 +02:00
Lukas Pioch 5580d558a5 Added missing checks for Initialize function and updated APIDoc 2017-05-08 06:31:45 +02:00
mathiascode 4311f4a658 Added some blocks and items (#3503) 2017-02-14 11:13:55 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Dave Tucker 83870f9fc0 Add enum for Sound and Particle Effects
Fixes #2603

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-11-24 13:21:40 +00:00
tycho b2fa71a32a Fix comments 2015-05-28 12:54:04 +01:00
tycho dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
Tycho 2a9664d6ca Initial convertion of a_Dt to std::chrono
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2015-01-11 21:12:26 +00:00
Mattes D 449d08cb3d Merged IniFile into main MCS sources. 2014-10-23 15:15:10 +02:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Howaner 83973520c8 Fixed iron trapdoors 2014-09-30 20:04:49 +02:00
Tycho 6e7c0e33b5 Added first test to show the object can be created 2014-09-17 18:40:10 +01:00
Mattes D af4a21ea06 Fixed deadlock when moving players to other worlds.
Fixes #1039, fixes #851
2014-06-08 21:58:30 +02:00
Mattes D fb58ef55be Fixed MSVC 64-bit build warnings. 2014-05-09 18:32:03 +02:00
Howaner 7fe6e40bf7 Add clicks, exp subtraction, item check, ... 2014-05-05 17:34:29 +02:00
Howaner 69961fc4df Add Light weighted pressure plates 2014-02-20 19:07:32 +01:00
Alexander Harkness 675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00