1
0
Fork 0
Commit Graph

44 Commits

Author SHA1 Message Date
Mattes D 61904af626 Moved growing from cWorld / cChunk to cBlockHandler descendants. 2019-10-28 10:45:43 +01:00
NiLSPACE 241d97bbf9
Fixed crash in hopper while pulling items from blockentity above itself (#4412) 2019-10-04 15:50:47 +02:00
Mattes D 365cbc6e1c
Refactored more of Entities and BlockEntities to use Vector3. (#4403) 2019-09-29 14:59:24 +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 a4dbb5c582
Prefer static_cast to reinterpret_cast (#4223)
* Change reinterpret_cast -> static_cast wherever possible
* Remove more unnecessary `const_cast`s.

reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
2018-05-02 08:50:36 +01:00
Bond-009 5badb9bcca cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050) 2017-11-20 11:13:11 +00: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
Mattes D 0dd1cd750b BlockEntities: Support cloning self. 2017-06-16 14:11:28 +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
LogicParrot 83459d0d89 Proper entity destruction in non-ticking chunks 2016-02-19 07:05:22 +02:00
Gargaj f9008a4860 allow use failures to propagate from the entity/block to the player 2015-12-13 13:27:38 +01:00
Mattes D 6e4122e551 Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
Tiger Wang 813ca04676 Fixes #2245
Whoops :/
2015-06-17 00:27:50 +01:00
Tiger Wang 30b17bcb97 Improved hoppers
* Fixes #1994
2015-05-11 22:58:27 +01:00
Howaner 1eedccc56a Merge branch 'master' into Inventory 2015-01-25 00:34:19 +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
Howaner b6fd400276 Own classes for all windows. 2014-12-13 15:06:55 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Steven Riehl 856764dee8 convert old style casts to fix warnings 2014-10-11 20:39:55 -06:00
Tiger Wang 9e4a5f824a Removed WSSCompact 2014-09-30 22:20:21 +01:00
Tycho a3f940f47c Removed more unessicary includes 2014-09-26 18:13:19 +01:00
Tycho 5623a045f5 Fixed potential null dereference
Fixes CID 70466
2014-08-10 22:06:56 +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
worktycho e1a561286a Fixed Issue with Comparing agast the wrong chest, potentially causing crashes. 2014-07-13 16:03:14 +01:00
madmaxoft d72a81cb8e cHopperEntity: Simplified chest conditions. 2014-07-12 23:34:32 +02:00
Tiger Wang e71e432633 Suggestions and bug fix
* Fixed hoppers pushing/pulling to/from (trapped)chests that do not form
a double-chest with the chest type directly connected to said hopper;
thank you, @madmaxoft
2014-07-12 22:06:25 +01:00
Tiger Wang 9e44b0aae1 Implemented trapped chests & others
+ Added trapped chests
* Fixed a bunch of bugs in the redstone simulator concerning wires and
repeaters
* Other potential bugfixes
2014-07-06 23:50:22 +01:00
Mattes D 742370497a Fixed crashes in HopperEntity.
Some of the coords were off and some functions were assuming too much.
Fixes the crash reported in http://forum.mc-server.org/showthread.php?tid=1497
2014-06-24 09:46:04 +02:00
jfhumann 013da806ec Did some static analysis, fixed some bugs and optimized a lot of code 2014-04-18 21:09:44 +02:00
madmaxoft 89027cb675 Fixed double to float conversions. 2014-03-16 22:00:28 +01:00
madmaxoft 46f6cef99f Fixed compilation in MSVC (forward class definitions). 2014-02-24 22:47:58 +01:00
Tycho df193c8f6f BlockEntities is warnings free 2014-02-24 11:29:59 -08:00
Tiger Wang c6a2e8c688 Removed debug messages again 2014-02-15 12:58:17 +00:00
Tiger Wang f4f0099947 Added proper debug messages 2014-02-13 20:20:37 +00:00
Tiger Wang c0e7d6fec9 Fancy stuff with constant references 2014-02-13 19:57:23 +00:00
Tiger Wang f97ce30151 Changed inheritance a bit
* cBlockEntityWithItems now inherits from cBlockEntityWindowOwner
2014-02-12 22:01:22 +00:00
Tiger Wang 9d54f2b761 Fixed #190
+ Hoppers now collect pickups above them
2014-02-11 22:54:01 +00:00
Tiger Wang 74645fdfaa Removed obsoleted functions 2014-01-16 19:00:49 +00:00
madmaxoft 9c8af58b75 Fixed a few MSVC warnings. 2014-01-06 22:22:33 +01:00
madmaxoft 8610d45ef1 Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT). 2013-12-20 16:01:34 +01:00
madmaxoft 044fd237b6 Moved bindings-related to a Bindings subfolder.
Ref.: #407
2013-12-08 12:17:54 +01:00
Alexander Harkness 675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00