1
0
Fork 0
Commit Graph

94 Commits

Author SHA1 Message Date
Damián Imrich 071b7be3d4
Basic elytra flight (#5124)
* Basic elytra flight

Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2021-04-03 18:45:20 +01:00
Tiger Wang 45591cbe7b
Properly deprecate more XYZ parameter'd functions (#5147)
* Fixes #5144
2021-03-15 02:28:18 +00:00
Tiger Wang be2bf999c2 Fix #5118 2021-02-07 22:36:15 +00:00
Tiger Wang 813176fbd1
cChunk: don't inherit from cChunkDef (#5106) 2021-01-18 16:09:10 +00:00
Tiger Wang 16aeb84cd3
Fix potential destruction crashes (#5095)
* 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
2021-01-02 13:50:34 +00:00
Mattes D bdb8830b9c Fixed various MSVC warnings. 2020-05-06 12:53:37 +01:00
Alexander Harkness 4e4ef9052e
Refactor minecart collision detection code. (#4712)
* Refactor minecart collision detection code.

 - Use new GetBoundingBox function.
 - Handle descending and ascending rails.
 - Snap to descending rails.

* Add message for UNREACHABLE
2020-05-04 21:04:21 +00:00
Tiger Wang 0b9b7bc1a8 Unify entity spawn packet sending 2020-04-30 23:04:56 +01:00
Mattes D 9ee47e5999 Using Super. 2020-04-16 20:07:48 +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 61904af626 Moved growing from cWorld / cChunk to cBlockHandler descendants. 2019-10-28 10:45:43 +01:00
Mattes D 365cbc6e1c
Refactored more of Entities and BlockEntities to use Vector3. (#4403) 2019-09-29 14:59:24 +02:00
Aplaus228 466d986e5e Change TakeDamageInfo::FinalDamage from int to float (#4359)
Closes #4357
2019-08-08 11:51:38 +01:00
peterbell10 950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
Fabian 0dd172b80f Store Health as a float (#4073)
* 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-11-22 13:47:52 +00:00
peterbell10 744cdb726d Fix minecart deceleration (#4059) 2017-10-21 17:53:24 +01:00
peterbell10 e225b7f826 Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
LogicParrot 49c443896d Revert "Replace ItemCallbacks with lambdas (#3948)"
This reverts commit 496c337cdf.
2017-09-02 08:50:23 +01:00
peterbell10 496c337cdf Replace ItemCallbacks with lambdas (#3948) 2017-09-01 13:04:50 +02:00
Lukas Pioch 7922e6addb Fixes problems with windows:
- Changed cPlayer:OpenWindow to accept a ref, tolua adds a nil check
- Close open lua window in destructor, to avoid dangling pointers
2017-06-05 15:14:23 +02:00
Mattes D caa05e7935 Fixed minecart destruction using deallocated memory. 2016-12-15 14:57:48 +01:00
Marvin Kopf ff4be64edc Powered rails can kick-start minecarts (#3472) 2016-12-10 09:53:35 +01:00
bibo38 cb640ffea4 Spectators added (#2852) 2016-10-12 14:38:45 +02:00
LogicParrot 90be4e7efd Entities now bail out of ticks if destroyed (#3363) 2016-09-03 14:31:27 +03:00
LogicParrot 2f11655f00 Fix minecart destruction crash (#3336) 2016-08-20 23:12:48 +03:00
LogicParrot 7b3a8a535a Fixed minecraft with chest destruction crash (#3335) 2016-08-20 18:19:54 +03:00
Lukas Pioch 9b96c0d18d Close chest window if minecart is destroyed 2016-06-30 11:08:09 +02:00
Woazboat 0d5a219eff Fix minecart block collision on curved rails 2016-04-22 22:56:40 +02:00
Marvin Kopf 01a100dc97 Add speed limit enforcement for minecarts 2016-04-15 01:59:18 +02:00
LogicParrot 83459d0d89 Proper entity destruction in non-ticking chunks 2016-02-19 07:05:22 +02:00
Marvin Kopf f96903c661 Fix minecart entity collision
* 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-16 17:02:05 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
tycho dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
tycho 77f1f58c0a Make -Werror disabling file only
Ad fix a load of warnings
2015-05-19 19:32:10 +01:00
Mattes D c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
DevToaster 45c84ea933 Changed air drag units to 'interpolated ticks' per second 2015-03-31 11:03:35 -04:00
DevToaster c743c7fd0c Modified physics for more vanilla-like behavior 2015-03-30 19:42:32 -04:00
Mattes D cc069ccb2a Changed cEntity::m_UniqueID to UInt32. 2015-03-21 15:18:17 +01:00
Howaner 1eedccc56a Merge branch 'master' into Inventory 2015-01-25 00:34:19 +01:00
Mattes D e211aafaa4 Fixed type-conversion warnings. 2015-01-18 11:02:17 +01:00
Tycho 8dc9cf0c76 Converted MinecartEntity to std::chrono 2015-01-16 13:42:44 +00: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
Howaner b6fd400276 Own classes for all windows. 2014-12-13 15:06:55 +01:00
Mattes D e2a04f580a BasicStyle: Added missing braces to control statements. 2014-12-05 16:59:11 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tiger Wang a9243257e5 Compilation fix 2014-09-28 13:11:41 +01:00
Tiger Wang 7ce09a9113 Suggestions 2014-09-27 19:19:28 +01:00
Tiger Wang d1814d2d67 Merge remote-tracking branch 'origin/master' into chestcarts
Conflicts:
	src/Entities/Minecart.cpp
2014-09-27 18:40:00 +01:00
Howaner 4b38e077cf Merge branch 'master' into EntityCustomName
Conflicts:
	src/ClientHandle.cpp
	src/ClientHandle.h
	src/Protocol/Protocol.h
	src/Protocol/Protocol125.cpp
	src/Protocol/Protocol125.h
	src/Protocol/Protocol17x.cpp
	src/Protocol/Protocol17x.h
	src/Protocol/ProtocolRecognizer.cpp
	src/Protocol/ProtocolRecognizer.h
	src/World.cpp
	src/World.h
2014-09-23 14:39:49 +02:00
Chris Darnell 806871b86f A few compiler warning fixes 2014-09-22 18:23:56 -04:00