25 Commits

Author SHA1 Message Date
Dylan K. Taylor
92be8c8ec0 PopulationTask: don't assume anything about TLS return values
while these SHOULD be what we say they are, it's possible for something else to overwrite them with junk and make the server catch fire.
2019-12-12 12:19:54 +00:00
Dylan K. Taylor
3be6665e3d AsyncWorker IDs now start from 0 instead of 1
this now matches their IDs in the AsyncWorker pool, as used by submitTask().
2018-06-11 11:58:24 +01:00
Dylan K. Taylor
88d83e0fca AsyncPool: Lazy-start AsyncWorkers when they are needed only
This changes how the AsyncPool works so that it does not immediately always start all of the workers in the pool.
Instead, workers will be started only when an idle worker was not found.
This allows for significant memory footprint reductions while idle.

In effect the async-workers setting in pocketmine.yml now dictates a _maximum_ pool size, not a fixed pool size.
2018-06-11 10:23:46 +01:00
Dylan K. Taylor
c8a87b14d5
PopulationTask: actually fix locks not getting released in generation errors 2018-06-07 23:53:59 +01:00
Dylan K. Taylor
7b17a83227 Level: fix chunk locks not getting released on generation errors 2018-06-06 11:42:29 +01:00
Dylan K. Taylor
6047810113 Level: remove useless null checks for fastDeserialize() returns 2018-06-01 17:02:29 +01:00
Dylan K. Taylor
ac5a91b67e Cleaned up bool comparison mess 2018-03-19 14:10:55 +00:00
Dylan K. Taylor
4f8e4f0522
Add EOF newlines where missing (bulk) (#1836)
This should solve issues with people making GitHub PRs and having the web editor messing things up. GitHub Web Editor sucks :(
2017-12-20 11:56:36 +00:00
Dylan K. Taylor
2fd61163bf cleanup some chunks leftovers from 1.0 2017-11-19 17:52:36 +00:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
dab73d8950 Implemented sky light generation-time population and updating, obsolete and close #160 2017-04-18 13:05:01 +01:00
Dylan K. Taylor
c21197ef17 Removed entanglement between chunks and providers. WARNING: BREAKING API CHANGES.
- All entity and tile constructors now require a \pocketmine\level\Level instead of a \pocketmine\level\format\Chunk.
- Chunk->getProvider() and Chunk->setProvider() have been removed.
- Chunk::__construct() has had the $provider parameter removed.
- Chunk->unload() has had the unused $save parameter removed.
- ChunkEvents now take a Level parameter instead of going through the Chunk

API bump to 3.0.0-ALPHA4
2017-02-21 17:08:45 +00:00
Dylan K. Taylor
ad0553fbf8 Bump to API 3.0.0-ALPHA2 - READ DESCRIPTION!
Refactored level\format\generic\GenericChunk -> level\format\Chunk.
Re-added support for async chunk sending
Refactored most Level IO into new namespaces for more organisation
Removed LevelDB loader completely (will be re-added at a later date)
2017-01-06 17:13:45 +00:00
Dylan K. Taylor
d8908676ac Refactor GenericChunk::fastSerialize() to be non-static, fix some unbelievable bugs, clean up some leftovers 2017-01-05 17:04:02 +00:00
Dylan K. Taylor
4c49db6036 New generic in-memory chunk format, fixed 0.17.0.1 chunk loading
Terrible performance, needs profiling. TODO: fix this.
2016-11-27 21:57:59 +00:00
SOF3
6fc435da0e
Imports rearrangement 2016-10-03 00:43:46 +08:00
Shoghi Cervantes
3e2cce3c2c use cleanup 2015-08-07 21:26:24 +02:00
Shoghi Cervantes
aa38a4885f
Fixed some issues with world generation and not creating chunks, closes #3008 2015-05-11 23:53:01 +02:00
Shoghi Cervantes
925b0c1b07
Fixed empty chunks on generation, closes #2998 2015-05-10 13:18:39 +02:00
Shoghi Cervantes
db409851e9
World generation is timed by type and chunks can be created on the fly 2015-05-09 19:03:41 +02:00
Shoghi Cervantes
fb03df3d06 Calculate skylight on chunk population 2015-05-06 16:57:49 +02:00
Shoghi Cervantes
d4b2e3d1b7
Improved heightmap generation 2015-04-29 23:19:27 +02:00
Shoghi Cervantes
1578fc3ddb Improved world generation manager, UUIDs (some work for future usage) 2015-04-21 19:54:16 +02:00
Shoghi Cervantes
7ee21f6254
Try to clean chunks on other threads 2015-04-15 22:14:51 +02:00
Shoghi Cervantes
08f2b7f291
Moved chunk population to async tasks, and no more cut trees! 2015-03-27 01:57:08 +01:00