summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/FastNBT.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-11-03Overhaul endian handling in ByteBuffer and FastNBT (#5543)Ash1-8/+5
* Overhaul endian handling in ByteBuffer and FastNBT Rather than juggling "swapped" and "unswapped" versions of integers, different library functions, #defines, etc., simply always read everything byte-by-byte. This works regardless of host CPU endian, got optimised down to either a normal load or a byteswap on every compiler I tested - only 1 instruction on most CPU architectures. This commit introduces a "Bytes" array type to keep endian-sensitive data seperate from host data, alongside the needed C++ template machinery for it to work seamlessly. This approach is a little bit safer as well since you get length- and type-checking for most callsites. * Remove remaining references to old-style endianness conversion, remove functions themselves. --------- Co-authored-by: Alexander Harkness <me@bearbin.net>
2021-03-05Prepare ChunkData for BlockState storage (#5105)Tiger Wang1-0/+1
* 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-01-11zlib -> libdeflate (#5085)Tiger Wang1-24/+24
+ Use libdeflate + Use std::byte * Fix passing temporary to string_view + Emulate make_unique_for_overwrite
2020-08-28FastNBTWriter: AddString now uses string_viewTiger Wang1-1/+1
* Avoids an allocation for all those string literals we pass in
2020-07-261.14 connection supportTiger Wang1-1/+1
2020-05-10Cleanup unneeded globals (#4736)peterbell101-1/+1
2020-04-30NBT: Dynamic list-max-count protection. (#4697)Mattes D1-0/+4
2018-02-05Deal with covered switches consistently (#4161)peterbell101-34/+1
* 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()
2017-07-30cParsedNBT: Improved error reporting (#3876)peterbell101-8/+81
* cParsedNBT: Improved error reporting * Fix typos
2016-02-05Bulk clearing of whitespaceLogicParrot1-35/+35
2015-07-09Fixes compilation failures on MacOSX 10.10Samuel Barney1-30/+30
* Replace old c-style casts with c++ casts * Added `-Wno-error=old-style-cast` to Protocol18x.cpp
2015-05-09More style checking.Mattes D1-1/+1
Spaces around some operators are checked.
2014-09-26Fixed UNUSED macro so that it doesn't require type knowledge.madmaxoft1-4/+4
Introduced new UNUSED_VAR macro that is used when type knowledge is available (for local variables).
2014-08-21Added initializers for class members.Mattes D1-0/+4
As reported by Coverity, these weren't initialized.
2014-07-24Removed redundant semicolons and re-added warningarchshift1-1/+1
2014-07-17Basic style fixes.madmaxoft1-3/+3
2014-05-09Build fixes after the last size_t batch.Mattes D1-7/+7
2014-05-09Fixed MSVC 64-bit build warnings.Mattes D1-4/+4
2014-05-08Fixed MSVC 64-bit build warnings.Mattes D1-4/+4
2014-05-01Fixed warnings in FastNBT.madmaxoft1-2/+2
2014-04-04Fixed silly Clang's warnings in FastNBT.madmaxoft1-28/+28
2014-03-02Added more documentation for FastNBT parser.madmaxoft1-3/+45
2014-03-01Improved comments in float size check.madmaxoft1-2/+2
2014-02-28Better fix for the 32-bit float reading.madmaxoft1-4/+5
2014-02-27Implemented ballistic missiles (fireworks)Tiger Wang1-1/+1
+ Added fireworks
2014-02-26Fixed a gcc warning in FastNBT.h.madmaxoft1-2/+11
2014-01-02More memory alignment fixes.madmaxoft1-3/+3
Ref.: #420.
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-05-01FastNBT: Added cFastNBTTag::GetName()madmaxoft@gmail.com1-0/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1437 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09Pickups are now being saved into Anvil.madmaxoft@gmail.com1-0/+4
Also changed cEntity rotation datatype to double git-svn-id: http://mc-server.googlecode.com/svn/trunk@1262 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-07cBlockArea can now be saved as a .schematic file.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1198 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: WorldStorage-related files in a separate subfoldermadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@882 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-15Anvil: added support for signs (why was it still missing??)madmaxoft@gmail.com1-0/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@616 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-274/+274
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-25Merged the composable_generator branch into the trunkmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@504 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-08Fast NBT writer (Saving a chunk is now about twice as fast)madmaxoft@gmail.com1-9/+49
git-svn-id: http://mc-server.googlecode.com/svn/trunk@484 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-07Fast NBT Parser (loading a chunk is now about 10 times faster)madmaxoft@gmail.com1-0/+234
git-svn-id: http://mc-server.googlecode.com/svn/trunk@481 0a769ca7-a7f5-676a-18bf-c427514a06d6