summaryrefslogtreecommitdiffstats
path: root/src/Entities/Minecart.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-04-30Added functionality: mobs now enter boats and minecarts (#5214)jclever771-0/+35
* Added functionality: mobs now enter boats and minecarts when coming into collision with them. * Fixed basic style errors, nothing else * Added self to contributors and reverted .gitignore to original state.
2021-04-12Update entity sizesTiger Wang1-1/+1
2021-04-03Basic elytra flight (#5124)Damián Imrich1-4/+2
* Basic elytra flight Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2021-03-15Properly deprecate more XYZ parameter'd functions (#5147)Tiger Wang1-1/+1
* Fixes #5144
2021-02-07Fix #5118Tiger Wang1-34/+3
2021-01-18cChunk: don't inherit from cChunkDef (#5106)Tiger Wang1-1/+1
2021-01-02Fix potential destruction crashes (#5095)Tiger Wang1-73/+84
* Fix potential destruction crashes * Fix destructors accessing destroyted objects * Fix cPlayer not destroying windows (Destroyed never called) * Tentatively fixes #4608, fixes #3236, fixes #3262 - Remove cEntity::Destroyed() and replace with cEntity::OnRemoveFromWorld() * Add missing call to OnRemoveFromWorld
2020-05-06Fixed various MSVC warnings.Mattes D1-4/+0
2020-05-04Refactor minecart collision detection code. (#4712)Alexander Harkness1-109/+275
* Refactor minecart collision detection code. - Use new GetBoundingBox function. - Handle descending and ascending rails. - Snap to descending rails. * Add message for UNREACHABLE
2020-05-01Unify entity spawn packet sendingTiger Wang1-1/+1
2020-04-16Using Super.Mattes D1-13/+13
2020-04-03Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D1-0/+1
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-28Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D1-8/+7
2019-09-29Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D1-12/+15
2019-08-08Change TakeDamageInfo::FinalDamage from int to float (#4359)Aplaus2281-2/+2
Closes #4357
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell101-0/+4
Add check for number of empty lines between functions and fix the corresponding failures
2017-11-22Store Health as a float (#4073)Fabian1-1/+1
* Fix #4024 * Fix clang error * Add comment * Fix behaviour * Save Health as float * Changed m_Health to float * Remove redundant static_cast * Fix casts
2017-10-21Fix minecart deceleration (#4059)peterbell101-32/+45
2017-09-11Replace ItemCallbacks with lambdas (#3993)peterbell101-13/+10
2017-09-02Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot1-10/+13
This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
2017-09-01Replace ItemCallbacks with lambdas (#3948)peterbell101-13/+10
2017-06-05Fixes problems with windows:Lukas Pioch1-1/+1
- Changed cPlayer:OpenWindow to accept a ref, tolua adds a nil check - Close open lua window in destructor, to avoid dangling pointers
2016-12-15Fixed minecart destruction using deallocated memory.Mattes D1-3/+8
2016-12-10Powered rails can kick-start minecarts (#3472)Marvin Kopf1-32/+60
2016-10-12Spectators added (#2852)bibo381-1/+9
2016-09-03Entities now bail out of ticks if destroyed (#3363)LogicParrot1-0/+5
2016-08-20Fix minecart destruction crash (#3336)LogicParrot1-1/+1
2016-08-20Fixed minecraft with chest destruction crash (#3335)LogicParrot1-2/+11
2016-06-30Close chest window if minecart is destroyedLukas Pioch1-0/+1
2016-04-22Fix minecart block collision on curved railsWoazboat1-10/+56
2016-04-15Add speed limit enforcement for minecartsMarvin Kopf1-41/+51
2016-02-19Proper entity destruction in non-ticking chunksLogicParrot1-4/+1
2016-02-16Fix minecart entity collisionMarvin Kopf1-26/+10
* Minecarts no longer handle a collision if the entity is behind them. * Minecarts will leave the pushing after a collision on a straight rail to the entity.
2016-02-05Bulk clearing of whitespaceLogicParrot1-10/+10
2015-05-24Made -Weverything an error.tycho1-6/+6
2015-05-19Make -Werror disabling file onlytycho1-5/+0
Ad fix a load of warnings
2015-05-09More style checking.Mattes D1-2/+2
Spaces around some operators are checked.
2015-03-31Changed air drag units to 'interpolated ticks' per secondDevToaster1-1/+1
2015-03-31Modified physics for more vanilla-like behaviorDevToaster1-1/+3
2015-03-21Changed cEntity::m_UniqueID to UInt32.Mattes D1-4/+7
2015-01-18Fixed type-conversion warnings.Mattes D1-1/+1
2015-01-16Converted MinecartEntity to std::chronoTycho1-5/+5
2015-01-11Initial convertion of a_Dt to std::chronoTycho1-5/+5
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2014-12-13Own classes for all windows.Howaner1-0/+1
2014-12-05BasicStyle: Added missing braces to control statements.Mattes D1-6/+23
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-7/+7
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-7/+7
2014-09-28Compilation fixTiger Wang1-2/+2
2014-09-27SuggestionsTiger Wang1-2/+2
2014-09-23A few compiler warning fixesChris Darnell1-40/+41
2014-09-22Made it compile with clangChris Darnell1-2/+2
2014-09-13Implemented Chest MinecartsTiger Wang1-8/+33
2014-09-01Added name tagHowaner1-2/+3
2014-08-30Fixed MSVC2008 compilation.madmaxoft1-18/+18
It was getting confused about which sqrt() overload to call.
2014-08-28Fixed a typo.Mattes D1-1/+1
2014-08-24Change comment formattingChristophe Piveteau1-20/+12
2014-08-18Adjust comment formattingChristophe Piveteau1-20/+40
2014-08-15Added a lot of commentsChristophe Piveteau1-30/+36
2014-08-15Clarify comment messageChristophe Piveteau1-2/+2
2014-08-15End of comment moved away from new lineChristophe Piveteau1-2/+1
2014-08-15Add some commentsChristophe Piveteau1-10/+21
2014-08-14Further changes in coding styleChristophe Piveteau1-38/+28
2014-08-13Further fixing of coding style errorsChristophe Piveteau1-26/+22
2014-08-13Another intendation errorChristophe Piveteau1-2/+2
2014-08-13Fixed braces and intendation errorsChristophe Piveteau1-3/+11
2014-08-13Implement ability to push minecarts on curved railsChristophe Piveteau1-2/+70
2014-07-19Minecart: slimmed down SpawnOn by keeping subtype in the payload enumarchshift1-15/+1
2014-07-17More trailing whitespace fixes.madmaxoft1-4/+4
2014-07-17Normalized comments.madmaxoft1-46/+46
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-04-26Further refactored, Reverted Minecart changearchshift1-14/+20
Other small changes.
2014-04-26Fixed a couple more warnings.archshift1-20/+14
2014-04-26Add entity invulnerableHowaner1-5/+9
2014-04-21reverted the revert of the minecart collision detection fix.jfhumann1-2/+1
2014-04-19Fixed Flint and Steel, reverted Minecart change, renamed a parameter namejfhumann1-1/+2
2014-04-18Did some static analysis, fixed some bugs and optimized a lot of codejfhumann1-1/+1
2014-04-17Added new AI rulesTiger Wang1-19/+19
+ Added new AI rules handling cacti and large heights * Fixed cIniFile not recognising comments in cIniFile::ReadFile() * Fixed users.ini not being properly generated * Changed all instances of (int)floor(GetPosXXX()) to POSXXX_TOINT
2014-03-08Fixed issues with int vs size_t and a few other warningsTycho1-2/+2
2014-03-01g_BlockXXX => cBlockInfo::XXXandrew1-8/+8
2014-02-05Fixed most of the reordering warningsTycho1-5/+5
2014-01-25Rail speed tweakTiger Wang1-2/+2
2014-01-24Added more minecart powered rail directionsTiger Wang1-3/+63
2014-01-19Begin implementing ascending railsTiger Wang1-2/+42
2014-01-19Added one more direction into collision checksTiger Wang1-26/+51
* Added direction XM_XP * Improved performance, thanks STR and xoft
2014-01-19Minecart improvements and fixesTiger Wang1-33/+43
* Fixed curved rails * Fixed detector rails in certain situations * Fixed powered rails and others passing bad meta to SnapToRail()
2014-01-18Minecart collision and general improvementsTiger Wang1-68/+237
+ Implemented collision on one type of rail * Improved curved rails somewhat * Fixed a crash bug
2014-01-16Removed obsoleted functionsTiger Wang1-12/+12
2014-01-15Furnace minecarts now stop being active after a while.STRWarrior1-1/+11
2014-01-15First implementation for furnace minecarts.STRWarrior1-1/+22
2014-01-13Final improvements to MinecartsTiger Wang1-56/+263
* Fixed curved rails being a little broken + Implemented detector rails + Implemented block collisions on rails * Fixed snapping to rail - Removed minecart physics conditions in Entity.cpp as minecarts use their own simulator when on rails Fixes #148 and #217; partially implemented #215. This is Cave Johnson, and we're done here.
2014-01-12Renamed cEmptyMinecart to cRideableMinecartSTRWarrior1-3/+4
2014-01-12EmptyMinecarts should be able to get a block inside of them.STRWarrior1-2/+4
2014-01-12Multiple enhancements and fixes to minecartsTiger Wang1-128/+182
+ They are destroyed instantly by creative mode * Physics is much improved + Basic implementation of powered rails
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-10-09Second round of fixesTiger Wang1-2/+2
* Implemented suggestions
2013-10-08Initial Metadata Commit [SEE DESC]Tiger Wang1-4/+54
+ Pigs, Minecarts, Sheep, Skeletons, Slimes, Villagers, Wolves, and Horses have metadata + Base code on taming wolves, shearing sheep, and taming horses + Sheep and horses have different colours when spawned
2013-09-22Fixed a few compiler warningsmadmaxoft1-21/+34
2013-09-13Even more fixes [SEE DESC]Tiger Wang1-8/+12
* Fixed minecarts breaking completely due to stuff * Rails are now non solid again + Added IsRail inline bool - Removed Herobrine
2013-09-09A few Minecart fixesTiger Wang1-6/+1
* Removed unneeded flatrail setpos * Fixed health checking
2013-09-03Fixed inconsistent meta namingTiger Wang1-10/+10
2013-09-02Minecart enhancements [SEE DESC]Tiger Wang1-112/+238
Curved rails. Better physics. Better code as improved by xoft. Stuff.
2013-08-29Physics enhancementsTiger Wang1-23/+22
Minecarts no longer glitch on flat rails Improved acceleration, speed limit, and stopping
2013-08-29Corrected comment TypeTypeTiger Wang1-1/+1
2013-08-29Implemented xoft's suggestions [SEE DESC]Tiger Wang1-32/+14
Rail metas are now in BlockID and exported to LUA Minecart now does a SetMass, instead of m_Mass Minecarts use SubType instead of TypeType
2013-08-28Fixed Minecart spawning issuesTiger Wang1-9/+10
Now you can have everything!
2013-08-27Preliminary Minecart physics handling [SEE DESC]Tiger Wang1-1/+196
This commit includes physics handling for the following scenarios: Flat rails in orientations [N, S, W, E] Ascending/descending rails in orientations [N, S, W, E] Powered rails are NOT handled (they don't respond to redstone). Curved rails are NOT handled (I haven't figured out how to do them :P) Please note that I have not tried to emulate vanilla behaviour because of a lack of knowledge on velocity unites/C++. We can say it's a feature or something. :P
2013-08-25Moved entity spawning into cEntity::Initialize().madmaxoft1-14/+0
It has been called in every descendant anyway, so it's better this way - reduced duplicate code.
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-2/+2
2013-08-16Possible entity ID fix?Tiger Wang1-2/+2
2013-08-16Compilation and Minecart fixesTiger Wang1-6/+6
2013-08-16Feature and bugfixes [SEE DESC]Tiger Wang1-0/+26
Added TNT and Hopper minecarts Fixed piston code failing without an extension set Repeaters are now broken Fixed not being able to place a minecart on an activator rail Added much needed comments on piston code Fixed minor formatting issue
2013-08-08Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.madmaxoft1-3/+7
As requested in FS 418.
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-160/+160
2013-07-07Improved function names for protocol packet sending; alpha-sorted the function listsmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1659 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-01Rewritten entity-on-fire management ("forever on fire" bugs)madmaxoft@gmail.com1-1/+1
Fixes FS #297 and part of FS #403. Added sizes to all entities. Moved all damage-related functions from cPawn to cEntity API change: renamed cPawn:TeleportTo() to cEntity:TeleportToCoords() git-svn-id: http://mc-server.googlecode.com/svn/trunk@1635 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09Minecarts get saved into Anvil.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1263 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09Pickups are now being saved into Anvil.madmaxoft@gmail.com1-0/+11
Also changed cEntity rotation datatype to double git-svn-id: http://mc-server.googlecode.com/svn/trunk@1262 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-03Player can sit in minecarts (but not move them yet)madmaxoft@gmail.com1-0/+87
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1249 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-18Minecarts can now be placed.madmaxoft@gmail.com1-0/+62
No interaction, no physics, though. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1219 0a769ca7-a7f5-676a-18bf-c427514a06d6