1
0
Fork 0
Commit Graph

14 Commits

Author SHA1 Message Date
Tiger Wang 868cd94ee9
Prepare ChunkData for BlockState storage (#5105)
* Rename ChunkData Creatable test

* Add missing Y-check in RedstoneWireHandler

* Remove ChunkDef.h dependency in Scoreboard

* Prepare ChunkData for BlockState storage

+ Split chunk block, meta, block & sky light storage
+ Load the height map from disk
- Reduce duplicated code in ChunkData
- Remove saving MCSBiomes, there aren't any
- Remove the allocation pool, ref #4315, #3864

* fixed build

* fixed test

* fixed the debug compile

Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com>
2021-03-05 14:03:55 +01:00
Mattes D 46398f4671 Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
peterbell10 7d512f2191 Limit the size of cListAllocationPool's free list 2019-02-20 09:07:44 +00:00
peterbell10 31a11a6df4
Optimise chunk set (#4260)
Closes #1244

Initially I was just going to add the cChunkData to cSetChunkData but profiling revealed 
that the copying wasn't even the biggest slowdown. Much more time was being spent in 
cChunk::CreateBlockEntities and cChunk::WakeUpSimulators than was in memcpy so I've made 
those significantly faster as well.

Optimisations performed:
 * cSetChunkData now stores blocks in a cChunkData object
 * cChunkData objects can now perform moves even if they are using different pools
 * cChunk::CreateBlockEntities now iterates in the correct order and only over present chunk sections
 * Similarly for cChunk::WakeUpSimulators
 * cSetChunkData::CalculateHeightMap now shortcuts to the highest present chunk section before checking blocks directly
2018-07-23 19:12:51 +01:00
peterbell10 096cdac80d Implement protocol level chunk sparsing (#3864) 2017-08-21 17:56:53 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Mattes D d135e49451 Removed unused class cChunkDataCollector. 2015-12-18 12:24:47 +01:00
Mattes D 6e4122e551 Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
archshift 4191be7ddb Removed redundant semicolons and re-added warning 2014-07-24 11:21:37 -07:00
madmaxoft 993fd14ddf Fixed basic whitespace problems.
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
2014-07-17 16:33:09 +02:00
madmaxoft f7777e8c75 Added comments, reformatted code. 2014-05-29 18:25:08 +02:00
Tycho 8f964886e0 Implemented style changes 2014-05-24 13:33:40 +01:00
Tycho 024027db89 Renamed cChunkBuffer to cChunkData 2014-05-21 19:58:48 +01:00
Tycho 8a0d3f7921 Fixed issue with types not being defined for an unused parameter 2014-05-18 15:37:17 +01:00