summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Prepare ChunkData for BlockState storage (#5105)Tiger Wang2021-03-051-85/+16
| | | | | | | | | | | | | | | | | | | | | | | * 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>
* Manage block entity lifetime with unique_ptr (#4080)peterbell102020-04-031-0/+1
|
* Optimise chunk set (#4260)peterbell102018-07-231-19/+6
| | | | | | | | | | | | | | | | | 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
* Changed entity ownership model to use smart pointersTiger Wang2017-08-071-8/+0
|
* Remove smart pointer macrospeterbell102017-07-211-1/+1
|
* Store cChunk::m_BlockEntities in a map (#3717)peterbell102017-05-221-4/+4
| | | | | | * Store block entities in a map from block index * Cleanup ForEachBlockEntity * Cleanup DoWithBlockEntityAt
* Bulk clearing of whitespaceLogicParrot2016-02-051-16/+16
|
* cSetChunkData constructor explicitly requires std::move() instead ofWoazboat2015-04-271-4/+6
| | | | unsafely stealing data
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-1/+1
|
* Rewritten block entity loading.Mattes D2014-08-291-0/+3
| | | | | | Block entities are now loaded based on the blocktype at the coords they specify; before loading, their type ("id" NBT tag) is checked. The chunk now expects that all block entities given to it via cChunk::SetAllData() have their valid blocktype; asserts if they don't. Fixes #1354.
* Added a queue for setting chunk data.madmaxoft2014-07-241-0/+120
Fixes #1196.