| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
also added support in included functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Alpha-sort cChestEntity
* Chests: use SendUpdateBlockEntity
* Pathfinder: fix out of range Y
* 1.13: correct weather packet ID
* Chests: fix neighbour scanner
+ Add OnAddToWorld and overload to scan neighbours there, instead of in the constructor/OnUse. This fixes hoppers accessing newly loaded double chests and seeing a null m_Neighbour, thus thinking its a single chest.
* Fix typo in cross coords computation.
* Simplify hopper logic.
* Block entities: ASSERT that type is correct
If you match the block type first before calling DoWithBlockEntity, the corresponding block entity must either be empty or correspond to the block type.
* Chunk: fix some forgotten PendingSendBE cleanup
+ Add cleanup in SetAllData, WriteBlockArea
- Remove RemoveBlockEntity (used once), HasBlockEntity (not used)
* Replace MakeIndex with MakeIndexNoCheck
* Remove extraneous MarkDirty in hopper & chests
|
|
|
|
|
|
| |
+ 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Removed BiomeDef.h
* Removed ChunkDef.h from Globals.h
* Added to CONTRIBUTORS.
* Re-added empty last line to Globals.h
* Included stddef and StringUtils in BiomeDef.h
* Fixed build tools compiling. It compiles, but at what cost?
* Added include to src/Generating/Trees.h
* Include added in ChunkGeneratorThread.h
* Moved rearranged includes in LineBlockTracer.cpp
* Re-arrange headers in ChunkInterface.cpp
* Included ChunkDef.h in Path.h
* Included ChunkDef.h in NBTChunkSerializer.h
* Rearranged included and added required includes to headers.
* Removed unnecessary included in StringUtils.h.
|
| |
|
|
|
| |
Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The generator now only takes care of servicing synchronous "GetChunk(X, Y)" and "GetBiomes(X, Y)" requests.
|
|
|
|
|
|
|
|
|
|
| |
* Vector3: Add custom fmt compatible formatter.
* cLuaState: Add fmt version of ApiParamError
* Use vector formatting in manual bindings
* Always log vectors with FLOG
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
* cChunkData: Change interface to use Vector3i
* cChunk: Add Vector3i overloads for bounded block get and set functions.
|
| |
|
|\
| |
| | |
* Changed entity ownership model to use smart pointers
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Check for intersection between placed blocks and entities.
+ Implemented GetPlacementCollisionBox, to permit custom placement collision boxes for blocks.
* Factored block-entity placement checking into another function in cPlayer.
- Removed vector min/max functions
* Use GetWorld to get the world in DoesPlacingBlocksIntersectEntity.
+ Added block height checks, allow different cEntity subclasses to decide whether they will prevent block placement.
|
|
|
|
|
|
| |
* Store block entities in a map from block index
* Cleanup ForEachBlockEntity
* Cleanup DoWithBlockEntityAt
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
When using ChunkWorx to generate multiple chunks, the server would sometimes fail an assert because it would generate a chunk even when it was successfully loaded. This was caused by chunks queued in cWorld's m_SetChunkDataQueue and thus being marked as "InQueue" although they were already loaded.
Solved by adding a new parameter to chunk coord callbacks specifying whether the operation succeeded or failed, and using that instead of the chunk presence flag to decide whether to generate or not.
|
| |
|
| |
|
|
|
|
|
|
| |
Thanks to @worktycho for guidance!
* Potential speed improvements
|
|
|
|
|
|
| |
* Fixes #1887
* Fixes #1763
* Fixes #1083
|
| |
|
| |
|
|
|
|
| |
std::hash is problematic in gcc / clang, one has a class, the other a struct.
|
| |
|
|
|
|
| |
Fixes #1618.
|
|
|
|
|
| |
It prepares the chunk - loads or generates it and lights it.
The spawn prepare process uses this function.
|
|\ |
|
|/ |
|
|\
| |
| | |
remove y-coord from chunks
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
As reported by Coverity, these weren't initialized.
|
| |
|
|
|
|
| |
There should be at least two spaces in front and one space after //-style comments.
|
|
|
|
| |
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
|
| |
|
|\ |
|
| | |
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
src/Chunk.cpp
src/Chunk.h
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
+ Added nibble compression
* Fixed an off by one
|
|\
| |
| |
| |
| | |
Conflicts:
src/Generating/PieceGenerator.cpp
|
| | |
|
| | |
|
|\|
| |
| |
| |
| | |
Conflicts:
src/ChunkDef.h
|
| |
| |
| |
| | |
This makes them easier to use in std::min et al.
|
| | |
|
| |
| |
| |
| | |
Also turned off Wpadded as it is indicates potental performance issues rather than potential bugs
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
Redstone crash fix and current console line replace function
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Major refactoring of redstone
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit is a refactoring of the redstone code, mainly the functions
handling the removal of invalid blocks from power supplier data
structures. Its aim is to improve performance and potentially reduce the
memory footprint of the data structures.
It works to reduce the amount of GetBlock()s triggered every tick.
Before, a GetBlock() was requested for every single item in the data
lists, as well as for every single redstone block in a chunk. Following
these changes, the AddBlock() event is utilised more effectively to only
update the lists when needed (a block is changed), as well as to insert
the block type (and update it when needed) alongside the coordinates
into the main redstone simulator chunkdata list.
In short, a single GetBlock() is now cached, with this cache being
updated when the simulator is awoken due to a block change.
At least, I *hope* that this is what it does :P
|
| |
| |
| |
| | |
Can't forward declare an enum
|
|/ |
|
|
|
|
| |
Also removed an unused inline header file (yuck).
|
| |
|
| |
|
| |
|
|
|