summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-08-28Save enderchest block entities to storageTiger Wang1-1/+13
+ Add EnderChest saving, as Vanilla does - Remove CreateBlockEntities. Storage should save & load everything so looping over chunk data is not needed
2020-04-10Oops, remember to save your files!Alexander Harkness1-6/+0
2020-04-10Add Zombie VillagersBond-0091-4/+15
2020-04-04Implement wither skeletons (#4563)Mat1-36/+34
2020-04-03Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D1-1/+1
The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change) The BlockInfo.h file was removed from Globals.h (main change) The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics) The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor) Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header. That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified. eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
2019-09-24NBTChunkSerializer: Cleaned up interface.Mattes D1-770/+878
Removed dependency on cChunkDataCallback. Moved all the serializing code into a worker class. Changed the serialization into a single-call action.
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell101-0/+7
Add check for number of empty lines between functions and fix the corresponding failures
2018-05-02Prefer static_cast to reinterpret_cast (#4223)peterbell101-49/+49
* Change reinterpret_cast -> static_cast wherever possible * Remove more unnecessary `const_cast`s. reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
2017-11-22Store Health as a float (#4073)Fabian1-1/+1
* Fix #4024 * Fix clang error * Add comment * Fix behaviour * Save Health as float * Changed m_Health to float * Remove redundant static_cast * Fix casts
2017-09-14Fix switch warnings (#4013)peterbell101-30/+34
* Fix switch warnings * Fix a variety of -Wswitch and -Wswitch-enum warnings * Remove unneeded -Wno-error flags * Reorganise some eMonsterType switches * Alpha sort eMonsterType cases in WriteMobMetadata and in cNBTChunkSerializer::AddMonsterEntity * List all mob types in protocol 1.12 and NBTChunkSerializer * cStructGenTrees::GetNumTrees: remove switch default * cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type
2017-08-26Implement anvil chunk sparsingpeterbell101-3/+3
2017-08-25Add cUUID class (#3871)peterbell101-5/+6
2017-08-24Minor changes (#3909)mathiascode1-1/+1
2017-08-21Fully implemented leashes (#3798)Pablo Beltrán1-2/+36
2017-08-18Represent cItem::m_Lore as an AStringVector (#3882)peterbell101-4/+11
* Replace cItem::m_Lore with AStringVector * Reword deprecation warning * Fix lua bindings
2017-08-03Remove double includes part 2 (#3890)peterbell101-1/+0
2017-07-12Added basic ocelot behavior (#3829)Bond-0091-1/+12
2017-07-07Added bed entity (#3823)Lukas Pioch1-0/+14
* Added bed entity * Export cBedEntity to lua * Set color of bed through item damage value * Added bed entity to APIDoc * NBT: Added loading and saving * Crafting recipes for the colored beds
2017-05-24Exported boatLukas Pioch1-0/+1
- NBT: Added saving / loading of material - Added the material in the item handler of the boat - Drop the correct boat if destroyed - APIDoc: Added desc and functions
2017-05-08Corrected brewingstand and added support for fuelLukas Pioch1-0/+1
2016-11-07Fixed TrappedChest saving. (#3423)Mattes D1-1/+1
Vanilla uses "Chest" in NBT for trapped chests.
2016-08-24Fixed type-casting-related warnings.Mattes D1-2/+2
2016-02-05Bulk clearing of whitespaceLogicParrot1-8/+8
2016-01-11Changed the format of the MobHead data to allow MobHeads working on MInecraft 1.8bibo381-1/+14
The NBT format now carries the texture data and transmit it to the client. See: http://minecraft.gamepedia.com/Head#Block_entity Related to #2674
2015-12-11Test for correct coordinates when fishingGargaj1-0/+1
Fun fact: this was able to actually deadlock the server depending on where you were standing :)
2015-12-10Test for correct coordinates when fishingGargaj1-0/+1
Fun fact: this was able to actually deadlock the server depending on where you were standing :)
2015-11-16changed mob age from char to intJulian Laubstein1-10/+10
2015-11-03Implemented brewingLukas Pioch1-0/+17
2015-09-25Compile.sh namechange to cuberiteSafwat Halaby1-1/+1
2015-09-25Namechange to CuberiteMattes D1-1/+1
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-75/+75
2015-07-17 Added Rabbit Metadata values.bibo381-43/+48
Added the Rabbit Types and the MoreCarrotTicks value. Types are selected randomly on creation. Fixes #1867
2015-07-14Support ageable mobsHallucino1-5/+28
Move ageable stuff in Monster directly
2015-03-14cPainting saving implementedTiger Wang1-14/+16
Additionally, it now inherits from cHangingEntity.
2015-03-13Fixed confusion over Item Frame directionsTiger Wang1-18/+4
2014-12-20Added RabbitsMasy981-0/+2
2014-12-18Added Entity GuardianMasy981-0/+2
2014-11-29Many api fixes, add vanilla names to mob type -> string functions and mob spawner fixes.Howaner1-1/+1
2014-11-18Finished mob spawner implementation.Howaner1-2/+3
2014-10-27Fixed compile (typos).Alexander Harkness1-2/+2
2014-10-27Another one.#Alexander Harkness1-0/+22
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-10-21Properly exported cItemFrame and cHangingEntity to Lua.Mattes D1-12/+12
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-09-25Anvil: Arrow Tile tags are a short in VanillaHowaner1-3/+3
2014-09-24derpHowaner1-4/+4
2014-09-24Don't create two entity lists.Howaner1-0/+12
2014-09-23Anvil: Wolf collar color is a byte in Vanilla.madmaxoft1-1/+1
Kept the old Int reading for compatibility reasons. Ref.: #1448
2014-09-23MCServer world compatiblity with vanilla and mcedit.Howaner1-0/+16
2014-09-19Implemented mob spawner.Howaner1-0/+15
2014-09-17Added first test to show the object can be createdTycho1-41/+41
2014-09-13Implemented Chest MinecartsTiger Wang1-1/+1
2014-09-02Added CustomName saving.Howaner1-0/+2
2014-08-29Removed unused codeTiger Wang1-1/+0
2014-08-04Anvil: Wolf owner not saved if not present.madmaxoft1-2/+8
2014-08-03Wolf uses UUID for owner.madmaxoft1-4/+6
Fixes #1277.
2014-07-31Renamed functions and added beacon json saving.Howaner1-2/+2
2014-07-30Added beacon load/save.Howaner1-0/+19
2014-07-29Slight cleanup after portalsTiger Wang1-1/+0
2014-07-20NBTChunkSerializer.cpp: Added break after serializing the splash potionarchshift1-0/+1
2014-07-19Splash potions: Renamed PotionParticleType to PotionColor for clarityarchshift1-1/+1
2014-07-17More trailing whitespace fixes.madmaxoft1-1/+1
2014-07-17Normalized comments.madmaxoft1-1/+1
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-15Restructured cSplashPotionEntity code.madmaxoft1-1/+1
The callback doesn't need declaration in the header. Renamed PotionName to PotionParticleType.
2014-07-12cNBTChunkSerializer: Fixed alignment.madmaxoft1-14/+14
2014-07-12Suggestions and bug fixTiger Wang1-10/+9
* Fixed hoppers pushing/pulling to/from (trapped)chests that do not form a double-chest with the chest type directly connected to said hopper; thank you, @madmaxoft
2014-07-12Added splash potions to NBT serialization and retrievalarchshift1-0/+11
2014-07-11SuggestionsTiger Wang1-4/+4
2014-07-08Made things consistentTiger Wang1-2/+4
2014-07-07Implemented trapped chests & othersTiger Wang1-3/+4
+ Added trapped chests * Fixed a bunch of bugs in the redstone simulator concerning wires and repeaters * Other potential bugfixes
2014-07-04Various fixedTiger Wang1-7/+4
* Fixed potential invalid pointer dereferencing, fixes #1117 * Fixed ender pearls not being loaded properly
2014-07-02SuggestionsTiger Wang1-9/+8
2014-06-30Removed unneeded codeTiger Wang1-14/+1
2014-06-29Properly implemented enderchestsTiger Wang1-0/+14
2014-06-24Add entity health saving.Howaner1-2/+1
2014-06-17The motion is already set in AddBasicEntity()Howaner1-5/+0
2014-06-04Health of monsters is now savedTiger Wang1-0/+1
2014-05-28Code improvementsHowaner1-1/+0
2014-05-28Add throw sound and fix arrow server crash.Howaner1-0/+1
2014-05-12More switch warnings.archshift1-0/+7
2014-05-12Fixed a few more switch warnings.archshift1-17/+20
2014-05-07Change m_RepairCost to int.Howaner1-1/+1
2014-05-07Fix MagmaCube save.Howaner1-1/+1
2014-05-07Add repair cost to cItem, add custom name to NBTChunkSerializer and fix anvil bugs.Howaner1-6/+31
2014-04-28Revert "Changed the old invulnerable methods from the wither to the new."Howaner1-8/+1
This reverts commit d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34.
2014-04-28Fixed projectile source filenames, indentationsarchshift1-1/+1
2014-04-27Moved cArrowEntity out of ProjectileEntity.harchshift1-1/+1
2014-04-26Implemented Chunk Sparsing with segmentsTycho1-2/+1
2014-04-26Further refactored, Reverted Minecart changearchshift1-4/+4
Other small changes.
2014-04-26Changed the old invulnerable methods from the wither to the new.Howaner1-1/+8
2014-04-26FixesHowaner1-1/+1
2014-04-25Small changes; warning fixing.archshift1-4/+4
2014-04-24Fixed references to renamed files.archshift1-1/+1
2014-03-25Ender crystalsandrew1-0/+13
2014-03-24Wither invulnerabilityandrew1-1/+7
2014-03-15Add item frame saving.Howaner1-2/+38
2014-03-15Add health and age load to pickup's.Howaner1-5/+5
2014-03-15Add ExpOrb saving.Howaner1-1/+16
2014-03-08Change TNT Fuse to ticksHowaner1-1/+1
2014-03-08Add TNT Save/Load and add Netbeans projects to .gitignoreHowaner1-1/+14
2014-03-07Add Flower PotsHowaner1-0/+15
2014-02-27Implemented ballistic missiles (fireworks)Tiger Wang1-3/+11
+ Added fireworks
2014-02-23Fixed Formatting, Added DropChances and CanPickUpLoot attributes to MonstersTheJumper1-0/+8
2014-02-23Rename SkullEntity to MobHeadEntityHowaner1-7/+7
2014-02-23Add Skulls/HeadsHowaner1-5/+21
2014-02-23Fixed Formatting, Added DropChances and CanPickUpLoot attributes to MonstersTheJumper1-0/+8
2014-02-23Fixed Formatting, Added DropChances and CanPickUpLoot attributes to MonstersTheJumper1-0/+1
2014-02-23Fixed Compiling IssuesTheJumper1-8/+7
2014-02-23Fixed Formatting, Added DropChance attributes to MonstersTheJumper1-0/+8
2014-02-19Rename SkullEntity to MobHeadEntityHowaner1-7/+7
2014-02-18Implemented paintings, fixes #689Tiger Wang1-0/+1
+ Implemented paintings
2014-02-18Implemented item frames, a part of #689Tiger Wang1-0/+1
+ Implemented Item Frames * Fixed Pitch and Yaw being wrongly flipped in the protocol (XOFT!)
2014-02-17Add Skulls/HeadsHowaner1-5/+21
2014-02-03Partial fix for #130Tiger Wang1-0/+1
2014-02-02Added saving of angry flag.Kirill Kirilenko1-0/+1
2014-02-02Fixed sitting tag.Kirill Kirilenko1-1/+1
2014-02-01Added saving of collar's color.Kirill Kirilenko1-1/+2
2014-01-30Fixes #606STRWarrior1-2/+2
2014-01-23Command block fixes 2andrew1-9/+10
2014-01-19Switched EnchantmentSerilizer to namespaceTycho1-1/+1
2014-01-19Spilt Writing of Enchantments to seperate classTycho1-1/+2
Created a new class cEnchantmentSerializer to serilize Enchantments to NBT. This breaks a dependecy chain between cChunkGenerator and cWorld. cEnchantmentSerializer is seperate from NBTWriter as it needs to access private members of cEnchantments so having it seperate reduces the spread of the frein modifier
2014-01-18Parse the MC|AdvCdm plugin messageandrew1-1/+1
2014-01-18Command block (de)serializationandrew1-10/+27
2014-01-17Removed internal cEntity::GetRot() usage.madmaxoft1-1/+1
2014-01-16Removed obsoleted functionsTiger Wang1-1/+1
2013-12-25Preliminary mobile entity savingTiger Wang1-5/+133
* Fixes #252 * Alleviates #380 + Adds mob saving * Fixed some debug !ASSERTs
2013-12-20Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT).madmaxoft1-1/+1
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-10-09Moved cMakeDir::MakeDir to cFile::CreateFolder.madmaxoft1-1/+0
And exported to Lua.
2013-09-08Thrown ender pearls are saved properly to MCA.madmaxoft1-0/+1
2013-09-08Initial boat supportTiger Wang1-0/+16
+ Boats are saved + Boats have physics + Boats spawn
2013-09-07Implemented loading more projectiles from MCA.madmaxoft1-1/+1
2013-08-22Projectile entities get saved into MCA filesmadmaxoft1-4/+63
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-4/+4
2013-08-16Feature and bugfixes [SEE DESC]Tiger Wang1-0/+2
Added TNT and Hopper minecarts Fixed piston code failing without an extension set Repeaters are now broken Fixed not being able to place a minecart on an activator rail Added much needed comments on piston code Fixed minor formatting issue
2013-07-29Changed everyting to Unix line endings.Alexander Harkness1-459/+459
2013-06-16Rewritten furnacesmadmaxoft@gmail.com1-8/+6
Furnaces now smelt the correct number of items. Furnaces store their contents in a cItemGrid. Furnace window is updated with correct items and progressbars. Furnace recipes now use ticks instead of milliseconds. Furnaces save and load their state completely, not missing a smelt operation. Hoppers take items out of furnaces. Dropped the cSlotAreaDropSpenser class, replaced it with generic cSlotAreaItemGrid git-svn-id: http://mc-server.googlecode.com/svn/trunk@1601 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-13Added hopper entity, it can suck items out of chests, dispensers, droppers and other hopppers above it.madmaxoft@gmail.com1-9/+25
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1587 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-02Enchantments: API and sending to clientmadmaxoft@gmail.com1-0/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1539 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-28Moved BlockEntities to a separate foldermadmaxoft@gmail.com1-7/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1527 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-26Implemented droppersmadmaxoft@gmail.com1-0/+16
Added a common ancestor class "DropSpenser" that has the common code for dropper and dispenser and is Lua-accessible, too. The Debuggers plugin now triggers both droppers and dispensers when rclking them with a redstone torch. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1514 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10Dispensers rewritten to use ItemGridmadmaxoft@gmail.com1-9/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1383 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10ItemGrid: Renamed all Item to Slot - better and consistent namingmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1381 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10Added cItemGrid to represent an XY grid of items; converted chests to use cItemGrid.madmaxoft@gmail.com1-10/+20
http://forum.mc-server.org/showthread.php?tid=831 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1380 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09Minecarts get saved into Anvil.madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1263 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09Pickups are now being saved into Anvil.madmaxoft@gmail.com1-0/+417
Also changed cEntity rotation datatype to double git-svn-id: http://mc-server.googlecode.com/svn/trunk@1262 0a769ca7-a7f5-676a-18bf-c427514a06d6