summaryrefslogtreecommitdiffstats
path: root/src/ChunkDef.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-09-25Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885)KingCol131-1/+1
* 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.
2020-08-28WorldStorage: Removed unused callback parametersTiger Wang1-21/+0
2020-04-21Vector3 in Handlers (#4680)Mattes D1-2/+11
Refactored all cBlockHandler and cItemHandler descendants to use Vector3.
2020-04-03Manage block entity lifetime with unique_ptr (#4080)peterbell101-1/+0
2019-12-22Improved large jungle and acacia tree generation (#4413)NiLSPACE1-0/+5
2019-10-28Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D1-5/+43
2019-09-29Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D1-0/+27
2019-09-27Fixed MSVC warnings (#4400)Mattes D1-3/+3
2019-09-08BiomeGen: Changed to use cChunkCoords params.Mattes D1-0/+5
2019-09-06Separated chunk generator from world / plugin interfaces.Mattes D1-2/+16
The generator now only takes care of servicing synchronous "GetChunk(X, Y)" and "GetBiomes(X, Y)" requests.
2018-09-24Add a formatting function for Vector3 (#4282)peterbell101-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
2018-07-24Broadcast refactor (#4264)peterbell101-0/+27
* 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
2018-07-23Optimise chunk set (#4260)peterbell101-7/+7
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-02-04cChunk and cChunkData: Use vectors for block get and set functions (#4172)peterbell101-0/+10
* cChunkData: Change interface to use Vector3i * cChunk: Add Vector3i overloads for bounded block get and set functions.
2017-11-20cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050)Bond-0091-5/+4
2017-08-17Changed int parameters to vector parameters in cCuboid and simulators (#3874)Lane Kolbly1-26/+38
2017-08-07Changed entity ownership model to use smart pointersTiger Wang1-1/+2
2017-08-03Remove double includes part 2 (#3890)peterbell101-3/+0
2017-07-28Check for intersection between placed blocks and entities. (#3850)Lane Kolbly1-0/+3
* 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.
2017-05-22Store cChunk::m_BlockEntities in a map (#3717)peterbell101-2/+2
* Store block entities in a map from block index * Cleanup ForEachBlockEntity * Cleanup DoWithBlockEntityAt
2016-02-05Bulk clearing of whitespaceLogicParrot1-1/+1
2015-11-23Added cChunkDef::IsValidWidth()Julian Laubstein1-1/+6
2015-11-10Added cChunkDef::IsValidHeight()Julian Laubstein1-0/+6
2015-10-04Fixed a race condition between chunk loader and generator.Mattes D1-1/+2
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.
2015-09-25Compile.sh namechange to cuberiteSafwat Halaby1-2/+2
2015-09-25Namechange to CuberiteMattes D1-2/+2
2015-07-31Unified the doxy-comment format.Mattes D1-17/+20
2015-06-06Changed appropriate containers to unordered_mapTiger Wang1-29/+0
Thanks to @worktycho for guidance! * Potential speed improvements
2015-06-06Redstone wire and trapdoor fixesTiger Wang1-0/+13
* Fixes #1887 * Fixes #1763 * Fixes #1083
2015-06-06ComparatorsTiger Wang1-0/+6
2015-05-19Fixed a lot of warningstycho1-2/+2
2014-12-24Replaced a std::hash specialization with explicit type.Mattes D1-7/+3
std::hash is problematic in gcc / clang, one has a class, the other a struct.
2014-12-24gcc compilation fix.Mattes D1-1/+6
2014-12-24Refactored all player block placing to go through hooks.Mattes D1-12/+36
Fixes #1618.
2014-12-10Added a cWorld:PrepareChunk function.Mattes D1-1/+22
It prepares the chunk - loads or generates it and lights it. The spawn prepare process uses this function.
2014-10-12convert old style casts to fix warningsSteven Riehl1-34/+30
2014-09-03re-add the missing "s" too cChunkCoordsWithBoolListLO1ZB1-1/+1
2014-09-03hopefully the last commit for removing y-coord from chunks. :)LO1ZB1-0/+21
2014-09-01Fixed off-by-one errors in cChunkDef asserts.madmaxoft1-8/+8
2014-08-30remove orphaned comment.LO1ZB1-4/+0
2014-08-28remove y-coord from chunksLO1ZB1-4/+2
2014-08-21Added initializers for class members.Mattes D1-1/+1
As reported by Coverity, these weren't initialized.
2014-07-21Style: Normalized to no spaces before closing parenthesis.madmaxoft1-4/+4
2014-07-17Fixed spaces around single-line comments.madmaxoft1-2/+2
There should be at least two spaces in front and one space after //-style comments.
2014-07-17Fixed basic whitespace problems.madmaxoft1-13/+13
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
2014-05-18Fixed issue with types not being defined for an unused parameterTycho1-40/+0
2014-04-28Hopefully fixed repeated clang warnings.madmaxoft1-9/+9
2014-04-26Implemented Chunk Sparsing with segmentsTycho1-95/+5
2014-04-25Implemented commentsTiger Wang1-23/+42
2014-04-24Implemented suggestionsTiger Wang1-67/+10
2014-04-07Attempt to fix errorsTiger Wang1-10/+10
2014-04-07Blocklight and skylight now compressedTiger Wang1-4/+4
2014-04-05Nibbletypes are compressedTiger Wang1-2/+75
+ Added nibble compression * Fixed an off by one
2014-03-11Fixed Chunkdef warningsTycho1-2/+2
2014-03-11Unified Vector classesandrew1-1/+1
2014-03-10Fixed xofts issuesTycho1-18/+8
2014-03-10Revert "Fixed some warnings"madmaxoft1-10/+7
This reverts commit 4cb0b82d1df560ad32c92eede91f466c75a87c87.
2014-03-09ChunkDef: Replaced enums with static const ints.madmaxoft1-10/+6
This makes them easier to use in std::min et al.
2014-03-09Globals.h is now warnings free again.Tycho1-8/+24
Also turned off Wpadded as it is indicates potental performance issues rather than potential bugs
2014-03-09Fixed some warningsTycho1-7/+10
2014-02-23fixed globals.h warningsTycho1-0/+1
2014-02-08Initial ChunkStay code.madmaxoft1-0/+1
2014-02-01Split cCoord template into one and two data typesTiger Wang1-10/+32
2014-01-29Fixed redstone simulator crash found in #570Tiger Wang1-5/+11
2014-01-26Refactored cBlockHandler::OnUse and dependentsTycho1-1/+0
2014-01-10Major refactoring of redstoneTiger Wang1-0/+2
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
2014-01-10Include Biome enum in ChunkDefBill Derouin1-2/+1
Can't forward declare an enum
2014-01-09Move biome definition to separate filesBill Derouin1-91/+2
2013-12-31clean up code for patchingTycho Bickerstaff1-0/+1
2013-12-31refactored chunk Queue to seperate classTycho Bickerstaff1-1/+0
2013-12-30Fixed compilation in VC2008.madmaxoft1-1/+1
Also removed an unused inline header file (yuck).
2013-12-22merged in warnings changesTycho Bickerstaff1-0/+1
2013-12-22converted commneted paramater names to the unused macroTycho Bickerstaff1-1/+2
2013-12-21ChunkSender is now warnings cleanTycho Bickerstaff1-1/+1
2013-12-20Attempt at fixing cChunkDef::Height signedness.madmaxoft1-12/+12
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-10-21Added ASSERTs to all ChunkDef operations.madmaxoft1-15/+40
This should avoid errors such as #276.
2013-10-12Added 1.7 biome constants.madmaxoft1-2/+47
2013-08-16Replaced E_ENTITY_TYPE_XXX with cMonster::mtXXX.madmaxoft1-1/+2
Also slightly improved the spawning algorithm.
2013-08-03Removed the unused BlockY parameter from cChunkDef::BlockToChunk()madmaxoft1-3/+2
2013-05-05ChunkDesc: Added heightmap verification (DEBUG-only), not used yetmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1443 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-14Changed DelayedFluidSimulatorData to be a vector rather than a list, performance doubled :)madmaxoft@gmail.com1-2/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1268 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-02Fixed gcc compilationmadmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1234 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-01New fire simulator, fully rewritten to the new scheme of things, directly accessing chunk data.madmaxoft@gmail.com1-0/+28
http://forum.mc-server.org/showthread.php?tid=617&pid=6626#pid6626 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1233 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-08Prepared cChunkDesc for further API extension; used it as the sole container for generated chunk data, including entities / block entities.madmaxoft@gmail.com1-0/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1200 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-20Made cWorld's block query functions more orthogonal, added GetBlockInfo() returning all info on a block.madmaxoft@gmail.com1-0/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@986 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-18Reverted previous commit, chose a different solution, much cleaner.madmaxoft@gmail.com1-14/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@975 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-18Made constants in cChunkDef enums, compilation fixes for gcc.madmaxoft@gmail.com1-11/+14
git-svn-id: http://mc-server.googlecode.com/svn/trunk@974 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-03Fixed a few gcc pedantic warnings; made BLOCKTYPE an unsigned char type.madmaxoft@gmail.com1-15/+15
git-svn-id: http://mc-server.googlecode.com/svn/trunk@711 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02BLOCKTYPE and NIBBLETYPE are finally exported in Lua API as numbers, not usertypesmadmaxoft@gmail.com1-4/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@642 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02cBlockArea object added (with only minimal testing so far)madmaxoft@gmail.com1-0/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@641 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02ChunkDef: Fixed getters taking a const ptrmadmaxoft@gmail.com1-5/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@638 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-492/+492
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-02Added the Biomal height generator, made it the default height generator.madmaxoft@gmail.com1-0/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@536 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-27Added some useful biome synonyms; added block property IsSnowable; alphabetically sorted block property settingmadmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@513 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-25Merged the composable_generator branch into the trunkmadmaxoft@gmail.com1-30/+150
git-svn-id: http://mc-server.googlecode.com/svn/trunk@504 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-04-23Anvil storage writing (Basic storage is working, NO entities except for chests are working! Don't use for real servers)madmaxoft@gmail.com1-1/+48
git-svn-id: http://mc-server.googlecode.com/svn/trunk@475 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-14Unified the chunk data to use the BLOCKDATA datatype.madmaxoft@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@413 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-0/+320
git-svn-id: http://mc-server.googlecode.com/svn/trunk@411 0a769ca7-a7f5-676a-18bf-c427514a06d6