summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-09-27Fixed MSVC warnings (#4400)Mattes D1-7/+7
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell101-12/+1
Add check for number of empty lines between functions and fix the corresponding failures
2018-06-25fix block area rotation bug (#4243)changyong guo1-3/+3
fix mirror method bug in class cBlockArea.
2018-02-05Deal with covered switches consistently (#4161)peterbell101-123/+118
* Fixes a number of "<function>: not all control paths return a value" warnings on MSVC. * Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults. * Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message()
2018-02-04cChunk and cChunkData: Use vectors for block get and set functions (#4172)peterbell101-4/+4
* cChunkData: Change interface to use Vector3i * cChunk: Add Vector3i overloads for bounded block get and set functions.
2017-09-23cBlockArea: Fix performance regression (#4045)peterbell101-2/+16
2017-09-11Replace ItemCallbacks with lambdas (#3993)peterbell101-5/+5
2017-09-11cBlockArea: change MakeIndex to return size_tpeterbell101-80/+43
2017-09-11cBlockArea: use unique_ptrpeterbell101-133/+106
2017-09-02Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot1-6/+6
This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
2017-09-01Replace ItemCallbacks with lambdas (#3948)peterbell101-6/+6
2017-08-17Changed int parameters to vector parameters in cCuboid and simulators (#3874)Lane Kolbly1-2/+2
2017-08-02Removed double includes (#3885)Lukas Pioch1-1/+0
2017-07-22BlockArea: Added the GetBounds function.Mattes D1-0/+12
2017-07-22Fixed check to see if block entity is in merge source.Lane Kolbly1-1/+1
2017-07-10Made cBlockArea:cChunkReader AreaBounds inclusive on both sides. (#3842)Lane Kolbly1-1/+1
2017-06-25Fix cBlockArea assertion and mis-indexing (#3810)peterbell101-2/+2
2017-06-24Fix cBlockArea null derefpeterbell101-41/+45
2017-06-24cBlockArea supports block entities. (#3795)Mattes D1-297/+858
2017-02-05Fixed bindings for cBlockArea:Read and Write. (#3568)Mattes D1-7/+7
The original bindings accepted nil as the World param, causing a crash.
2016-12-09Fix meta mirror (#3470)Mattes D1-3/+3
2016-08-24Fixed type-casting-related warnings.Mattes D1-3/+3
2016-08-04Added compile.sh folder check warningsLogicParrot1-0/+4
2016-02-05Bulk clearing of whitespaceLogicParrot1-38/+38
2016-01-12Added detailed logging to cBlockArea::Read() bad Y coords.Mattes D1-4/+12
Ref.: http://forum.mc-server.org/showthread.php?tid=2307
2015-07-31Unified the doxy-comment format.Mattes D1-6/+6
2015-06-30BlockArea: Fixed a crash with areas higher than chunk height.Mattes D1-1/+7
2015-06-08cBlockArea: Added CountSpecificBlocks() API function.Mattes D1-0/+59
2015-05-24Made -Weverything an error.tycho1-4/+4
2015-04-30Added cBlockArea:CountNonAirBlocks API function.Mattes D1-0/+31
2015-04-29Added cBlockArea::msSimpleCompare merge strategy.Mattes D1-1/+37
2015-04-29Added cBlockArea:GetNonAirCropRelCoords() API function.Mattes D1-0/+67
Fixes #1915.
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-44/+44
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-44/+44
2014-08-28More template keyword fixes.Mattes D1-9/+9
2014-08-21Added initializers for class members.Mattes D1-1/+3
As reported by Coverity, these weren't initialized.
2014-07-17Normalized comments.madmaxoft1-2/+2
This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-07-17Fixed basic whitespace problems.madmaxoft1-5/+5
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
2014-07-13Fixed wrong types. (BLOCKTYPE -> NIBBLETYPE)Howaner1-1/+1
2014-06-19Nullify deleted pointers.archshift1-11/+17
2014-06-09Fixed a crash when creating negative-size blockareas.madmaxoft1-0/+8
Now the server emits a warning instead and continues execution.
2014-06-02cBlockArea reading hotfix.madmaxoft1-63/+109
This should fix the crashes introduced with chunksparsing. Not the most performant solution, but at least it should work. Ref.: #1056
2014-05-29Added comments, reformatted code.madmaxoft1-1/+1
2014-05-24Implemented style changesTycho1-1/+1
2014-05-21Fixed stylistic issuesTycho1-4/+4
2014-05-21Renamed cChunkBuffer to cChunkDataTycho1-2/+2
2014-05-21Fixed minor style issuesTycho1-1/+1
2014-05-11Fixed a warning and a complaint about a never-read variable.archshift1-14/+11
2014-05-09Fixed MSVC 64-bit build warnings.Mattes D1-5/+5
2014-05-08Fixed MSVC 64-bit build warnings.Mattes D1-5/+5
2014-05-05Fixed a flipped condition in cBlockArea::Merge().madmaxoft1-2/+2
2014-05-01Fixed warnings in cBlockArea.madmaxoft1-2/+2
2014-04-28Disabled MSVC warnings about constant bool expressions.madmaxoft1-2/+19
2014-04-28Removed static from combinators.Tycho1-7/+7
THis allows us to use the functions in template params at the cost of polluting the global namespace.
2014-04-28Fixed unbraced ifsTycho1-10/+40
2014-04-28Removed inlines from combinatorsTycho1-7/+7
gcc requires external linkage for functions provided to template parameters
2014-04-28Template MagicTycho1-168/+175
Removed need to allocate a fake meta block by using templates to provide a version of the code that does not use metas. Also changed the function to a template argument to make sure that the compilier is able to inline it.
2014-04-27Worked around const pointerTycho1-2/+3
2014-04-27Initialised MetaArrays in BlockAreaTycho1-2/+6
Fixes CID 43621
2014-04-27Fixed bad commentTycho1-1/+1
2014-04-26Implemented Chunk Sparsing with segmentsTycho1-97/+69
2014-04-03Fixed a few MSVC type warnings.Mattes D1-1/+1
2014-04-01cBlockArea: Added the msMask merge strategy.madmaxoft1-0/+30
2014-03-31Added new merge strategy "msDifference"STRWarrior1-0/+34
2014-03-28Implemented the msSpongePrint merge strategy.madmaxoft1-4/+34
Similar to msImprint, but allows prefabs to carve out air pockets, too. The sponge block is used as the NOP block.
2014-03-25BlockArea: Create() can take the size as Vector3i, too.madmaxoft1-0/+9
2014-03-25BlockArea: Switched internal coords to Vector3i.madmaxoft1-175/+149
2014-03-11Using ```const Vector3i &```STRWarrior1-1/+1
2014-03-12Renamed cBlockArea Offset to WEOffset.madmaxoft1-2/+2
Even in getters / setters.
2014-03-11Renamed m_Offset to m_WEOffsetSTRWarrior1-3/+3
2014-03-10This allows a blockarea to have an Offset.STRWarrior1-0/+19
2014-02-24Added useful parameter overloads to cBlockArea Lua API.madmaxoft1-0/+95
2014-02-24Fixed crash in cBlockArea rotation.madmaxoft1-6/+6
Fixes #720.
2014-01-20Moved Schematic file methods to seperate classTycho1-158/+1
2014-01-20Seperated BlockArea From WorldTycho1-5/+4
If anyone can come up with a better name for the interface I'll change it, It contians to methods which do compleatly unrelated things
2014-01-07Fixed a few MSVC warnings.madmaxoft1-3/+3
2013-12-31fixed warnings in BlockArea.cppTycho Bickerstaff1-0/+2
2013-12-26cBlockArea: Fixed writing full-height areas.madmaxoft1-2/+2
2013-12-25Fixed block area height check.madmaxoft1-2/+2
The block area couldn't be read up to chunk height.
2013-12-20Fixed a typo in cBlockArea merging code.madmaxoft1-2/+1
2013-12-17cBlockArea: origin is initialized in the constructor and the loader.madmaxoft1-0/+6
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-2124/+2124
2013-06-21Explosions don't produce warnings in cBlockArea; fixed logging in cBlockAreamadmaxoft@gmail.com1-7/+7
Fixes FS #389 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1616 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-31BlockArea: Added runtime check for coords in Debug modemadmaxoft@gmail.com1-0/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1337 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-26BlockArea: Finished rotation and mirroring with meta. Implemented example meta handling for vines, stairs and torches.madmaxoft@gmail.com1-12/+143
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1319 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-26cBlockArea: Fixed type / meta copypasta errors in mirroring and rotation codemadmaxoft@gmail.com1-7/+37
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1318 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-25BlockArea: Implemented rotation without meta manipulationmadmaxoft@gmail.com1-6/+76
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1317 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-25BlockArea: Implemented mirroring without meta manipulationmadmaxoft@gmail.com1-0/+182
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1316 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-19The subgenerators use cChunkDesc instead of raw arrays. cChunkDesc is based on cBlockArea. Initial version of Lakes generator.madmaxoft@gmail.com1-0/+79
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1286 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-13Implemented the cBlockArea:RelLine() API function.madmaxoft@gmail.com1-1/+135
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1211 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-13Added HOOK_WEATHER_CHANGING.madmaxoft@gmail.com1-0/+12
http://www.mc-server.org/support/index.php?do=details&task_id=299 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1210 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-11Added a forgotten part of the cBlockArea::FillRelCuboid() function.madmaxoft@gmail.com1-0/+21
Now meta, blocklight and skylight can be filled, too git-svn-id: http://mc-server.googlecode.com/svn/trunk@1209 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-11More API functions in cBlockArea: Create(), Fill(), FillRelArea()madmaxoft@gmail.com1-0/+130
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1208 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-10Added cBlockArea:Merge() API function to merge two block areas using different strategies.madmaxoft@gmail.com1-1/+180
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1207 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-10cBlockArea: Added empty NBT tags to schematic file saving for better compatibility.madmaxoft@gmail.com1-0/+5
Some tools require the presence of Entities and TileEntities tags in the schematic file and they wouldn't open the file if missing. Writing empty list tags. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1204 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-09Added cBlockArea:Expand() API function (untested)madmaxoft@gmail.com1-0/+90
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1203 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-08cChunkDesc can now read and write cBlockAreas.madmaxoft@gmail.com1-0/+34
A simple example is provided in the Debuggers plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1201 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-07Added cBlockArea:CopyTo() and :CopyFrom(), so now block areas can be duplicated easily.madmaxoft@gmail.com1-0/+45
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1199 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-07cBlockArea can now be saved as a .schematic file.madmaxoft@gmail.com1-0/+46
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1198 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-07Added a sanity check to cBlockArea:Crop()madmaxoft@gmail.com1-0/+13
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1197 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-07Added a cGZipFile class for reading GZipped files.madmaxoft@gmail.com1-13/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1196 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-06cBlockArea can now be loaded from a .schematic file.madmaxoft@gmail.com1-0/+122
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1195 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-06Added a new API call to cBlockArea: Crop().madmaxoft@gmail.com1-1/+82
Also fixed cBlockArea:MakeIndex(), the indexing was wrong. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1194 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-04cBlockArea now has a GetBlockTypeMeta() and GetRelBlockTypeMeta() methodsmadmaxoft@gmail.com1-0/+37
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1118 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-14BlockArea: Added const-ness to non-modifying functions, so that a const cBlockArea & can be used.madmaxoft@gmail.com1-11/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@960 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-06BlockArea writing support (BlockTypes with BlockMeta only)madmaxoft@gmail.com1-4/+61
git-svn-id: http://mc-server.googlecode.com/svn/trunk@933 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-09BlockArea name change revertedlapayo94@gmail.com1-1/+1
fixed VS2008 building git-svn-id: http://mc-server.googlecode.com/svn/trunk@649 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-08Squirrel Pluginslapayo94@gmail.com1-1/+1
I worked a little bit on the squirrel Bindings They work now on linux and windows :) (OSX is untested, but should work also) but they are very limited at the moment. (Only made OnChat working) I also fixed some small bugs. git-svn-id: http://mc-server.googlecode.com/svn/trunk@648 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02cBlockArea object added (with only minimal testing so far)madmaxoft@gmail.com1-0/+626
git-svn-id: http://mc-server.googlecode.com/svn/trunk@641 0a769ca7-a7f5-676a-18bf-c427514a06d6