summaryrefslogtreecommitdiffstats
path: root/src/Simulator/SandSimulator.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-03-15Properly deprecate more XYZ parameter'd functions (#5147)Tiger Wang1-2/+2
* Fixes #5144
2021-03-07Some emplace_back replacements (#5149)12xx121-1/+1
* replace push_back with emplace_back when a new object was created in the function call
2020-09-12Use tracing for explosions (#4845)Tiger Wang1-23/+23
* 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-08-02Always use relative coordinates in AddBlockTiger Wang1-10/+4
+ Pass block, use relatives * Fixes everything immediately converting abs back to rel and getting block, when these data were already available
2020-08-02Add WakeUp/AddBlock distinctionTiger Wang1-1/+1
* 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-04-09Falling blocks can now be spawned at any position. (#4620)Mattes D1-6/+1
* 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-03Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D1-1/+2
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
2019-10-16Refactored block-to-pickup conversion. (#4417)Mattes D1-2/+2
2018-09-24Add a formatting function for Vector3 (#4282)peterbell101-3/+3
* Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG
2018-07-27cWorld: Manually bind deprecated broadcast functions (#4265)peterbell101-1/+1
Ref: https://github.com/cuberite/cuberite/pull/4264#discussion_r204769193
2018-01-03Concrete mixing (#4096)Zach DeCook1-0/+5
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)
2017-08-17Changed int parameters to vector parameters in cCuboid and simulators (#3874)Lane Kolbly1-6/+6
2017-08-07Changed entity ownership model to use smart pointersTiger Wang1-4/+4
2017-08-03Remove double includes part 2 (#3890)peterbell101-1/+0
2017-06-30Added 1.12 blocks (#3760)Bond-0091-3/+7
2017-05-08Added missing checks for Initialize function and updated APIDocLukas Pioch1-1/+6
2017-02-14Added some blocks and items (#3503)mathiascode1-0/+9
2016-02-05Bulk clearing of whitespaceLogicParrot1-5/+5
2015-11-24Add enum for Sound and Particle EffectsDave Tucker1-1/+2
Fixes #2603 Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-05-28Fix commentstycho1-4/+5
2015-05-24Made -Weverything an error.tycho1-3/+7
2015-01-11Initial convertion of a_Dt to std::chronoTycho1-1/+1
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2014-10-23Merged IniFile into main MCS sources.Mattes D1-1/+1
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-09-30Fixed iron trapdoorsHowaner1-0/+1
2014-09-17Added first test to show the object can be createdTycho1-0/+1
2014-06-08Fixed deadlock when moving players to other worlds.Mattes D1-1/+1
Fixes #1039, fixes #851
2014-05-09Fixed MSVC 64-bit build warnings.Mattes D1-1/+1
2014-05-08Fixed MSVC 64-bit build warnings.Mattes D1-1/+1
2014-05-05Add clicks, exp subtraction, item check, ...Howaner1-0/+4
2014-02-20Add Light weighted pressure platesHowaner1-0/+2
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-09-09Added a few changes [SEE DESC]Tiger Wang1-1/+1
* Revised pickup comments * SlotArea pickup tossing now reflects Player.cpp * Removed unneeded ItemShears comment (was working already) * Sand and gravel pickups spawn with correct speed
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-1/+1
2013-07-22Simulators don't simulate in invalid chunks (valgrind error)madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1676 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-10Added dragon egg to falling blocks.nielsbreu@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1577 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-19Fixed entity chunking.madmaxoft@gmail.com1-0/+6
Sand simulator was off, sand in negative coords wouldn't fall properly git-svn-id: http://mc-server.googlecode.com/svn/trunk@1489 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-07Please keep the lists alpha-sortedmadmaxoft@gmail.com1-3/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1458 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-07Sand can fall through snow.faketruth1-0/+3
Patch courtesy of InHavk git-svn-id: http://mc-server.googlecode.com/svn/trunk@1457 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-03SandSimulator: Fixed sand dropping on half-slabs; added more blocks that break falling sand into pickups, fixed instant-fallmadmaxoft@gmail.com1-31/+47
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1242 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-02cSandSimulator: implemented InstantFallmadmaxoft@gmail.com1-1/+27
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1241 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-02Rewritten SandSimulator to use direct chunk access; and sand falling on torches now creates a pickup.madmaxoft@gmail.com1-47/+188
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1240 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-28Converted simulators to take cWorld reference instead of a pointermadmaxoft@gmail.com1-7/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1228 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-28Simulators now have direct access to the cChunk object in the WakeUp() callmadmaxoft@gmail.com1-8/+20
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1227 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-13Preparation for multiple fluid simulators.madmaxoft@gmail.com1-5/+4
Moved all simulators into a subfolder. Replaced cWaterSimulator and cLavaSimulator with a generic cFluidSimulator. Moved original fluid simulation into cClassicFluidSimulator. Fluid simulator parameters (MaxHeight, Falloff) are read from the world.ini file (can have nether-like lava with lower falloff) git-svn-id: http://mc-server.googlecode.com/svn/trunk@956 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03Moved blockticking into blockhandler classes.madmaxoft@gmail.com1-8/+8
Also slightly refactored the variable / argument names (BlockID is deprecated, use BlockType instead) git-svn-id: http://mc-server.googlecode.com/svn/trunk@921 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-30Added falling block entities. Sand and gravel now properly fall downfaketruth1-17/+28
Implemented the PACKET_SPAWN_OBJECT packet Made some things use BLOCKTYPE instead of char Android: Requests WebAdmin port when pressing the configure button git-svn-id: http://mc-server.googlecode.com/svn/trunk@915 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-91/+91
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14Fixed a (pretty big) memory leak in cSandSimulatorfaketruth1-12/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@252 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-1/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-29- Animals burn now when moving into lava or firelapayo94@gmail.com1-1/+2
- Monster health is now working properly git-svn-id: http://mc-server.googlecode.com/svn/trunk@157 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-29- Pickups should now burn in firelapayo94@gmail.com1-4/+4
- The player no longer gets an empty bucket when in creative mode - improved the simulators again (moved to std::list because this should be faster with so many objects) (But the water simulation still is very slow) git-svn-id: http://mc-server.googlecode.com/svn/trunk@153 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28- little performance improvement on the sand simulatorlapayo94@gmail.com1-1/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@151 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28Little improvement to save some cpu time but it´s still very heavy cpu loadlapayo94@gmail.com1-0/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@141 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26- improved Simulator system lapayo94@gmail.com1-0/+74
-> Manager handles all ticks -> advantage: Much easier to add new simulators, because you only have to register them in the manager - moved sand and gravel simulation to a Simulator-class (cSandSimulator) - Made Squid a little bit more funny and realistic, because it dies now when it´s not in water -Escaping mobs run now faster than normal (They just walked away before :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@125 0a769ca7-a7f5-676a-18bf-c427514a06d6