summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/MobSpawnerEntity.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix sending incorrect date values on world changeTiger Wang2021-04-121-2/+4
| | | | Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge.
* Unify DoWithBlockEntity (#5168)Tiger Wang2021-03-281-1/+2
| | | | | | + DoWith calls now broadcast the block entity and mark the chunk dirty + Add block entity change queue to synchronise BE updates with block updates * Fixed a few incorrect assertions about BE type - Remove manual overloads
* Comment and code style fixTiger Wang2020-12-211-13/+8
| | | | | + Add static keyword - Don't capture everything in lambda
* Adding more customize options to mob spawners and improving the way to look for surrounding entities (#4955)12xx122020-10-101-61/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added nearly any customize option * fixed unnecessary diff added comments * removed unnecessary const qualifier * fixed build * changed to ForEachEntityInBox * added docs * updated lua api description * checkstyle * added changes suggested by @peterbell10 And now the player may break the server by setting ridiculous ranges * updated docs changed cast to static cast * fixed clang * fixed clang on WSSAnvil.cpp Co-authored-by: 12xx12 <12xx12100@gmail.com>
* Fixing Mob spawner behaviour (#4930)12xx122020-09-271-19/+14
| | | | | | | | | | | | | | | | | | | * fixed mob spawner failure (whoopsie in the BlockEntity.GetChunkZ()) Style * fixed spawning behaviour * fixed saving entity type saving * checkstyle * removed debug log * removed short saving * Style Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Enable some more clang-tidy linter checks (#4738)peterbell102020-05-151-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid inefficient AString -> c_str() -> AString round trip * Avoid redundant string init expressions * Avoid unnecessary return, continue, etc. * Add .clang-format to help with clang-tidy fix-its * Avoid unnecessary passing by value * Avoid unnecessary local copying * Avoid copying in range-for loops * Avoid over-complicated boolean expressions * Some violations missed by my local clang-tidy * Allow unnecessary continue statements * Add brackets * Another expression missed locally * Move BindingsProcessor call into clang-tidy.sh and add space * Fix pushd not found error * Different grouping of CheckBlockInteractionRate
* Using Super.Mattes D2020-04-161-2/+2
|
* Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D2019-10-281-18/+18
|
* Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D2019-09-291-6/+6
|
* Add a formatting function for Vector3 (#4282)peterbell102018-09-241-1/+1
| | | | | | | | | | * Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG
* Broadcast refactor (#4264)peterbell102018-07-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | | * Move Broadcast functions from cChunkMap to cBroadcaster - Remove cBroadcastInterface in favour of cBroadcaster. - cChunk: Remove broadcast functions. * resurect broadcast interface * Absorb cBroadcaster into cWorld. Removes the need for forwarding the function calls. * Improve const-correctness * Use Int8 instead of char + Comment `ForClients` functions * Improve comments * Broadcaster: Rename ForClients functions
* Prefer static_cast to reinterpret_cast (#4223)peterbell102018-05-021-1/+1
| | | | | | | * 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.
* Fixed 2 small warnings (#4055)Bond-0092017-10-021-1/+1
|
* BroadcastBlockBreakAnimation and BroadcastBlockEntity use vectors (#4038)Bond-0092017-09-251-1/+1
|
* Removed UTF-8 BOM (#4033)Lukas Pioch2017-09-191-1/+1
|
* Replace ItemCallbacks with lambdas (#3993)peterbell102017-09-111-28/+13
|
* Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot2017-09-021-13/+28
| | | | This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
* Replace ItemCallbacks with lambdas (#3948)peterbell102017-09-011-28/+13
|
* Changed entity ownership model to use smart pointersTiger Wang2017-08-071-2/+2
|
* BlockEntities: Support cloning self.Mattes D2017-06-161-5/+19
|
* FastRandom rewrite (#3754)peterbell102017-06-131-6/+6
|
* Removed ClientHandle.h dependencies from common headers.Mattes D2016-11-181-0/+1
|
* allow use failures to propagate from the entity/block to the playerGargaj2015-12-131-2/+4
|
* Add enum for Sound and Particle EffectsDave Tucker2015-11-241-1/+1
| | | | | | Fixes #2603 Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
* Fix commentstycho2015-05-281-1/+2
|
* Made -Weverything an error.tycho2015-05-241-4/+9
|
* Make -Werror disabling file onlytycho2015-05-191-2/+2
| | | | Ad fix a load of warnings
* Changed cEntity::m_UniqueID to UInt32.Mattes D2015-03-211-1/+1
|
* Initial convertion of a_Dt to std::chronoTycho2015-01-111-1/+1
| | | | also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
* NULL -> nullptrTiger Wang2014-12-171-2/+2
|
* MobSpawner fixes.Howaner2014-12-011-2/+2
|
* Many api fixes, add vanilla names to mob type -> string functions and mob spawner fixes.Howaner2014-11-291-46/+1
|
* Finished mob spawner implementation.Howaner2014-11-181-29/+4
|
* Fixed compile errors.Howaner2014-09-271-38/+38
|
* Implemented mob spawner.Howaner2014-09-191-21/+289
|
* Created MobSpawnerEntity class.Howaner2014-09-171-0/+92