summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* goodTiger Wang2016-12-181-36/+4
|
* testTiger Wang2016-12-181-3/+1
|
* testTiger Wang2016-12-181-170/+245
|
* Simplified cChunkMap chunk storage (#2565)Tiger Wang2016-08-031-584/+224
|
* Updated API documentation.Mattes D2016-07-181-2/+2
|
* Makes tall grass and large flowers bonemealableQUSpilPrgm2016-06-031-0/+18
| | | | Adds the bonemeal particle effect to some more places
* Update Dispensers and let them act more like in VanillaQUSpilPrgm2016-06-031-6/+9
| | | | | | | | - Added code to make bonemeal, potions, minecarts, XP bottles and boats work inside dispensers - Dispensers are now able to place TNT if the block is transparent but not air - Added return value that indicates the success of pumpkin, melon, sugarcane and cactus growing functions - Changed return value of "GrowRipePlant" so that it actually indicates if the block was able to grow - Fixed "GrowSugarcane" and "GrowCactus" in "GrowRipePlant" so that it only grows them a single block
* 1.9 / 1.9.2 / 1.9.3 / 1.9.4 protocol support (#3135)Pokechu222016-05-141-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Semistable update to 15w31a I'm going through snapshots in a sequential order since it should make things easier, and since protocol version history is written. * Update to 15w34b protocol Also, fix an issue with the Entity Equipment packet from the past version. Clients are able to connect and do stuff! * Partially update to 15w35e Chunk data doesn't work, but the client joins. I'm waiting to do chunk data because chunk data has an incomplete format until 15w36d. * Add '/blk' debug command This command lets one see what block they are looking at, and makes figuring out what's supposed to be where in a highly broken chunk possible. * Fix CRLF normalization in CheckBasicStyle.lua Normally, this doesn't cause an issue, but when running from cygwin, it detects the CR as whitespace and creates thousands of violations for every single line. Lua, when run on windows, will normalize automatically, but when run via cygwin, it won't. The bug was simply that gsub was returning a replaced version, but not changing the parameter, so the replaced version was ignored. * Update to 15w40b This includes chunk serialization. Fully functional chunk serialization for 1.9. I'm not completely happy with the chunk serialization as-is (correct use of palettes would be great), but cuberite also doesn't skip sending empty chunks so this performance optimization should probably come later. The creation of a full buffer is suboptimal, but it's the easiest way to implement this code. * Write long-by-long rather than creating a buffer This is a bit faster and should be equivalent. However, the code still doesn't look too good. * Update to 15w41a protocol This includes the new set passengers packet, which works off of the ridden entity, not the rider. That means, among other things, that information about the previously ridden vehicle is needed when detaching. So a new method with that info was added. * Update to 15w45a * 15w51b protocol * Update to 1.9.0 protocol Closes #3067. There are still a few things that need to be worked out (picking up items, effects, particles, and most importantly inventory), but in general this should work. I'll make a few more changes tomorrow to get the rest of the protocol set up, along with 1.9.1/1.9.2 (which did make a few changes). Chunks, however, _are_ working, along with most other parts of the game (placing/breaking blocks). * Fix item pickup packet not working That was a silly mistake, but at least it was an easy one. * 1.9.2 protocol support * Fix version info found in server list ping Thus, the client reports that it can connect rather than saying that the server is out of date. This required creating separate classes for 1.9.1 and 1.9.2, unfortunately. * Fix build errors generated by clang These didn't happen in MSVC. * Add protocol19x.cpp and protocol19x.h to CMakeLists * Ignore warnings in protocol19x that are ignored in protocol18x * Document BLOCK_FACE and DIG_STATUS constants * Fix BLOCK_FACE links and add separate section for DIG_STATUS * Fix bat animation and object spawning The causes of both of these are explained in #3135, but the gist is that both were typos. * Implement Use Item packet This means that buckets, bows, fishing rods, and several other similar items now work when not looking at a block. * Handle DIG_STATUS_SWAP_ITEM_IN_HAND * Add support for spawn eggs and potions The items are transformed from the 1.9 version to the 1.8 version when reading and transformed back when sending. * Remove spammy potion debug logging * Fix wolf collar color metadata The wrong type was being used, causing several clientside issues (including the screen going black). * Fix 1.9 chunk sending in the nether The nether and the end don't send skylight. * Fix clang build errors * Fix water bottles becoming mundane potions This happened because the can become splash potion bit got set incorrectly. Water bottles and mundane potions are only differentiated by the fact that water bottles have a metadata of 0, so setting that bit made it a mundane potion. Also add missing break statements to the read item NBT switch, which would otherwise break items with custom names and also cause incorrect "Unimplemented NBT data when parsing!" logging. * Copy Protocol18x as Protocol19x Aditionally, method and class names have been swapped to clean up other diffs. This commit is only added to make the following diffs more readable; it doesn't make any other changes (beyond class names). * Make thrown potions use the correct appearence This was caused by potions now using metadata. * Add missing api doc for cSplashPotionEntity::GetItem * Fix compile error in SplashPotionEntity.cpp * Fix fix of cSplashPotionEntity API doc * Temporarilly disable fall damage particles These were causing issues in 1.9 due to the changed effect ID. * Properly send a kick packet when connecting with an invalid version This means that the client no longer waits on the server screen with no indication whatsoever. However, right now the server list ping isn't implemented for unknown versions, so it'll only load "Old" on the ping. I also added a GetVarIntSize method to cByteBuffer. This helps clean up part of the code here (and I think it could clean up other parts), but it may make sense for it to be moved elsewhere (or declared in a different way). * Handle server list pings from unrecognized versions This isn't the cleanest way of writing it (it feels odd to use ProtocolRecognizer to send packets, and the addition of m_InPingForUnrecognizedVersion feels like the wrong technique), but it works and I can't think of a better way (apart from creating a full separate protocol class to handle only the ping... which would be worse). * Use cPacketizer for the disconnect packet This also should fix clang build errors. * Add 1.9.3 / 1.9.4 support * Fix incorrect indentation in APIDesc
* Fix Crash on stopping the server (#3176)LogicParrot2016-05-011-0/+13
|
* ChunkLayers now stored in std::mapLogicParrot2016-04-241-59/+58
|
* Revert "ChunkLayers now stored in std::map"LogicParrot2016-04-241-51/+59
|
* ChunkLayers now stored in std::mapLogicParrot2016-04-231-59/+51
|
* Reduced unnecessary block updatesLogicParrot2016-04-221-20/+1
|
* Updated cChunk::SetMeta, fixed grass growth, reduced markDirty/setMeta usageLogicParrot2016-04-161-2/+2
|
* Improved player freeze codeLogicParrot2016-04-051-2/+3
|
* Entities are never lostLogicParrot2016-03-301-10/+4
|
* Fixed removing entities from parent chunksLogicParrot2016-02-221-1/+1
|
* Bulk clearing of whitespaceLogicParrot2016-02-051-48/+48
|
* Updated old forum linksMathias2016-01-311-1/+1
|
* Fixed Clang warnings.Mattes D2016-01-061-9/+9
|
* Reorganised the redstone simulatorTiger Wang2015-12-181-115/+8
| | | | | | -> Many thanks to @worktycho for the idea, and @Haxi52 for the implementation plan! * Uses classes and inheritance now * Speed should be improved
* allow use failures to propagate from the entity/block to the playerGargaj2015-12-131-3/+3
|
* Add enum for Sound and Particle EffectsDave Tucker2015-11-241-1/+1
| | | | | | Fixes #2603 Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
* Changed static_cast to FloorCJulian Laubstein2015-11-231-1/+1
|
* Adjusted height validation using cChunkDef::IsValidHeight()Julian Laubstein2015-11-231-1/+1
|
* Implemented brewingLukas Pioch2015-11-031-0/+33
|
* Fixed a race condition between chunk loader and generator.Mattes D2015-10-041-18/+18
| | | | | | 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.
* Maked it compileable for clang-3.7Lukas Pioch2015-09-251-2/+2
|
* Add new "ForEach" function: ForEachLoadedChunk.tycho2015-09-241-0/+28
|
* Some warning fixesJulian Laubstein2015-08-181-1/+1
|
* Unified the doxy-comment format.Mattes D2015-07-311-1/+0
|
* Silenced and fixed many warning messages across multiple files.Samuel Barney2015-07-291-19/+19
|
* Reinstate "Chunk queue collapsing"Tiger Wang2015-06-101-16/+0
| | | | | This reinstates commit f36acb683594daff5af3971dcbe3c3a171628b78 and reverts commit adfbc42c021e1bcfcb355933c0fd784306ce0e18.
* Revert "Chunk queue collapsing"worktycho2015-06-071-0/+16
|
* Moved Chunk Broadcasts over to the regular queuetycho2015-06-051-16/+0
|
* Made cLightingThread own its callbackstycho2015-05-301-2/+2
|
* CheckBasicStyle: checks spaces around * and &.Mattes D2015-05-091-9/+9
|
* Added support for additional data in the ParticleEffect Packettycho2015-05-071-0/+22
| | | | Also started refactoring how broadcasts are handled
* Fix explosions trying to write to unread blockareaTiger Wang2015-04-261-3/+5
|
* Hotfixed some chunk presence issues when generating.Mattes D2015-04-211-0/+2
|
* Changed cEntity::m_UniqueID to UInt32.Mattes D2015-03-211-7/+7
|
* Handle client 'leave bed' requestTiger Wang2015-02-081-4/+1
| | | | * Fixes #1728
* Initial convertion of a_Dt to std::chronoTycho2015-01-111-2/+2
| | | | also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
* Refactored all player block placing to go through hooks.Mattes D2014-12-241-36/+67
| | | | Fixes #1618.
* NULL -> nullptrTiger Wang2014-12-171-1/+1
|
* Added a cWorld:PrepareChunk function.Mattes D2014-12-101-0/+97
| | | | | It prepares the chunk - loads or generates it and lights it. The spawn prepare process uses this function.
* Fixed missing CS lock in cChunkMap::WakeUpSimulatorsInArea().Mattes D2014-10-311-0/+1
|
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-139/+139
|
* Functions in cPluginManager get references instead of pointers.Mattes D2014-10-151-6/+8
|
* Added barriers correctlyMasy982014-09-271-0/+1
|
* Removed more unessicary includesTycho2014-09-261-1/+1
|
* Merge branch 'master' into 1.8-ProtocolHowaner2014-09-131-3/+3
|\ | | | | | | | | Conflicts: src/Items/ItemHoe.h
| * Fixed farmland issues.Howaner2014-09-121-3/+3
| |
* | 1.8: Added ParticleEffect packet.Howaner2014-09-111-2/+2
|/
* WorldStorage no longer queues chunks into generator.Mattes D2014-09-051-2/+2
|
* Rewritten chunk status to specify whether the chunk is in queue.Mattes D2014-09-051-51/+24
| | | | This fixes #1370.
* Fixed compilation after chunk Y removal.madmaxoft2014-09-041-1/+1
|
* Merge remote-tracking branch 'origin/master' into EntitiesInBoxmadmaxoft2014-09-041-129/+129
|\
| * Merge pull request #1351 from LO1ZB/remove-a_RelYMattes D2014-09-031-129/+129
| |\ | | | | | | remove y-coord from chunks
| | * remove y-coord from chunksLO1ZB2014-08-281-129/+129
| | |
* | | Added cWorld::ForEachEntityInBox()madmaxoft2014-09-031-0/+32
|/ /
* | Fixed style.madmaxoft2014-08-301-2/+3
| |
* | Improved explosion damageTiger Wang2014-08-291-45/+22
|/
* Exported the beacon.Howaner2014-07-301-0/+18
|
* Added beacon.Howaner2014-07-301-0/+1
|
* Added a queue for setting chunk data.madmaxoft2014-07-241-16/+9
| | | | Fixes #1196.
* Style: Normalized to no spaces before closing parenthesis.madmaxoft2014-07-211-36/+36
|
* Fixed clamping issuesarchshift2014-07-191-4/+1
|
* Fixed spaces before commas.madmaxoft2014-07-181-2/+2
|
* Merge branch 'master' of https://github.com/mc-server/MCServermadmaxoft2014-07-171-1/+3
|\
| * Fixed crash with entities in unloaded chunksTiger Wang2014-07-171-1/+3
| | | | | | | | * Fixes #1190
* | Fixed spaces around single-line comments.madmaxoft2014-07-171-11/+12
| | | | | | | | There should be at least two spaces in front and one space after //-style comments.
* | Fixed basic whitespace problems.madmaxoft2014-07-171-3/+3
|/ | | | Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
* Merge pull request #1183 from Howaner/SoundsTiger Wang2014-07-171-2/+2
|\ | | | | Reset meta to zero when the blocks explode
| * Derp.Howaner2014-07-151-2/+2
| |
| * Reset meta to zero when the block explode.Howaner2014-07-141-4/+4
| |
* | Merge pull request #1172 from mc-server/coverity_fixesMattes D2014-07-131-1/+1
|\ \ | | | | | | Coverity fixes
| * | Added parenthasiesworktycho2014-07-131-1/+1
| | |
| * | Add Null check to SendBlockToworktycho2014-06-261-1/+1
| | | | | | | | | Fixes CID 43611
* | | Fixed MSVC warnings in SoundEffect functions.madmaxoft2014-07-131-1/+1
| |/ |/|
* | Merge branch 'master' into SoundsHowaner2014-07-131-2/+2
|\ \
| * | Fixed wrong types. (BLOCKTYPE -> NIBBLETYPE)Howaner2014-07-131-2/+2
| | |
* | | Changed BroadcastSoundEffect function to take floating pos.Howaner2014-07-131-3/+3
|/ /
* | Merge pull request #1154 from mc-server/trappedchestsTiger Wang2014-07-131-1/+20
|\ \ | | | | | | Implemented trapped chests & others
| * | Implemented trapped chests & othersTiger Wang2014-07-071-1/+20
| | | | | | | | | | | | | | | | | | | | | + Added trapped chests * Fixed a bunch of bugs in the redstone simulator concerning wires and repeaters * Other potential bugfixes
* | | Implemented support for forced chunk ticking.madmaxoft2014-07-101-2/+18
|/ / | | | | | | Fixes #1160.
* / Added generic entity-collecting.Mattes D2014-06-271-3/+3
|/ | | | | Now any cEntity can be collected, not only cPickups. This should help PR #1098.
* Merge branch 'master' of github.com:mc-server/MCServerTycho2014-06-161-4/+16
|
* Fixed a race condition when adding a player to a world.madmaxoft2014-06-101-0/+24
|
* Merge remote-tracking branch 'origin/pistonfixes'Tiger Wang2014-06-021-2/+2
|\ | | | | | | | | Conflicts: src/Chunk.cpp
| * Hopefully fixed piston duplication issuesTiger Wang2014-05-251-2/+2
| | | | | | | | | | * Fixes #879 * Fixes #714
* | Merge branch 'master' into chunksparsing/structsTycho2014-05-101-2/+0
|\| | | | | | | | | Conflicts: src/Chunk.h
| * Merge branch 'master' into redstoneimprovementsTiger Wang2014-05-041-1/+4
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/ClientHandle.cpp src/Entities/FallingBlock.cpp src/Mobs/AggressiveMonster.cpp src/Simulator/IncrementalRedstoneSimulator.cpp
| * | Redstone simulator now directly accesses cChunkTiger Wang2014-04-271-2/+0
| | | | | | | | | | | | | | | | | | * Redstone simulator performance improvements * Added return values to some functions * Minor fixes
* | | Merge branch 'master' into chunksparsing/structsTycho2014-05-011-5/+6
|\ \ \ | | |/ | |/|
| * | Fixed player spawning #953.madmaxoft2014-04-271-1/+4
| |/
| * Removed unused assignments.archshift2014-04-261-4/+2
| |
* | Merge branch 'master' into chunksparsing/structsTycho2014-04-271-29/+37
|\| | | | | | | | | | | Conflicts: src/Chunk.cpp src/Chunk.h
| * Did some static analysis, fixed some bugs and optimized a lot of codejfhumann2014-04-181-20/+20
| |
| * Fixed chunkstays not being removed on auto-delete.madmaxoft2014-04-121-9/+17
| | | | | | | | Fixes #837.
* | Implemented Chunk Sparsing with segmentsTycho2014-04-261-10/+6
|/
* ENUMified shrapnel levelTiger Wang2014-03-201-2/+2
|
* Merge branch 'master' into awesometntTiger Wang2014-03-181-55/+59
|\ | | | | | | | | Conflicts: src/ChunkMap.cpp
| * Fixed chunkmap tree block replacing.madmaxoft2014-03-181-8/+2
| |
| * Fixed double to float conversions.madmaxoft2014-03-161-45/+46
| |
| * Add new leaves to all classes.Howaner2014-03-161-0/+7
| |
* | Added levels of shrapnelTiger Wang2014-03-181-3/+7
| |
* | Merge branch 'master' into awesometntTiger Wang2014-03-101-2/+20
|\|
| * Add Lua Bindings for FlowerPotEntity.h and add documentation.Howaner2014-03-071-2/+2
| |
| * Add Flower PotsHowaner2014-03-071-0/+18
| |
* | Shrapnel now configurableTiger Wang2014-03-101-1/+1
| |
* | Added extra awesomeness to TNTTiger Wang2014-03-051-11/+20
|/ | | | | | | + TNT now has a chance of flinging FallingBlock entities around * Improved TNT damage * Improved TNT spawning visuals * Possible fix for 'SetSwimState failure' messages in debug
* Fixed a possible crash in cWorld::WakeUpSimulatorsInArea().madmaxoft2014-02-241-0/+4
| | | | The Y coords weren't checked.
* Merge pull request #697 from Howaner/SkullMattes D2014-02-191-0/+18
|\ | | | | Add Skulls/Heads to MCServer
| * Rename SkullEntity to MobHeadEntityHowaner2014-02-191-2/+2
| |
| * Add Heads completelyHowaner2014-02-181-0/+18
| |
* | Added cWorld:SetAreaBiome() API function.madmaxoft2014-02-181-2/+59
|/ | | | Fixes #675.
* Rewritten Lua ChunkStay API into a single function, cWorld:ChunkStay().madmaxoft2014-02-101-2/+11
| | | | This fixes problems with indeterminate class object lifespan (Lua-GC) and forgetting to disable it or keep it until ready.
* Merge remote-tracking branch 'origin/master' into ChunkStaymadmaxoft2014-02-091-1/+1
|\
| * Merge branch 'master' into playerimprovementsTiger Wang2014-02-091-1/+1
| |\ | | | | | | | | | | | | Conflicts: MCServer/Plugins/APIDump/APIDesc.lua
| * | Fixed explosions bugTiger Wang2014-02-051-1/+1
| | | | | | | | | | | | * Fixed bug where explosions would sometimes never be sent
| * | Fixed a bunch of MSVS warningsTiger Wang2014-02-051-1/+1
| | | | | | | | | | | | | | | * Possibly also fixed some bugs with pathfinding and TNT, though unlikely
* | | Initial ChunkStay code.madmaxoft2014-02-081-113/+72
| |/ |/|
* | Greatly improved TNT propulsion chancesTiger Wang2014-02-031-1/+1
|/
* Merge pull request #623 from mc-server/tntMattes D2014-02-031-36/+121
|\ | | | | TNT improvements
| * Inversed conditionTiger Wang2014-02-031-25/+28
| |
| * Uncommented pickup spawner codeTiger Wang2014-02-021-3/+7
| |
| * TNT improvementsTiger Wang2014-02-021-37/+115
| | | | | | | | | | | | + Added entity damage + Added entity propulsion * Fixed #67 and fixed #230
* | Changed pointers to referencesTycho2014-02-011-3/+3
| |
* | Changed signitures of Several BLockHandler MethodsTycho2014-02-011-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Changed the signitures of the following to use interfaces: GetPlacementBlockTypeMeta OnPlaced OnPlacedByPlayer OnDestroyed OnNeighbourChanged NeighbourChanged OnUse CanBeAt Check
* | Refactored cBlockHandler::OnUse and dependentsTycho2014-01-261-2/+57
|/
* Basic command block implementationandrew2014-01-181-0/+17
|
* More MSVC warning fixes.madmaxoft2014-01-071-1/+1
|
* Fixed compiler warning.STRWarrior2013-12-221-1/+1
|
* Implented BroadcastParticleEffectSTRWarrior2013-12-221-0/+19
|
* Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT).madmaxoft2013-12-201-12/+12
|
* This adds the cWorld::BroadcastEntityEffect and cWorld::BroadcastRemoveEntityEffect functions.STRWarrior2013-12-151-0/+33
|
* Implemented note block playing and fixed wireTiger Wang2013-12-141-0/+17
| | | | Game of Thrones music in Minecraft, here I come!
* Merge branch 'master' of https://github.com/mc-server/MCServer into fixesnfeaturesTiger Wang2013-12-081-1/+1
|\ | | | | | | | | | | | | Conflicts: src/Bindings/Bindings.cpp src/Bindings/Bindings.h src/Blocks/BlockHandler.cpp
| * Moved bindings-related to a Bindings subfolder.madmaxoft2013-12-081-1/+1
| | | | | | | | Ref.: #407
* | Renamed animation functionTiger Wang2013-12-071-3/+3
| | | | | | | | | | Renamed BroadcastPlayerAnimation to BroadcastEntityAnimation. Not just players can have animations, you know.
* | Fixed duplication glitch with QueueSetBlockTiger Wang2013-12-061-2/+2
|/ | | | | | | If a coordinate was queued, and then the block there was broken, it would reappear: double items! Also now just sets meta if previous and current blocktypes matched.
* Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft2013-11-301-1/+18
|
* Fixed a bug with TNT waking simulatorsTiger Wang2013-11-281-2/+2
|
* Improved TNT pickup randomisationTiger Wang2013-11-281-1/+1
|
* Made TNT pickups spawning chance 25%Tiger Wang2013-11-271-2/+2
|
* Fixed VC2008 compilation, normalized include paths.madmaxoft2013-11-271-1/+1
|
* Fixed the remaining derpsAlexander Harkness2013-11-271-2/+2
|
* Attempt to fix compilationTiger Wang2013-11-241-2/+2
|
* Merge remote-tracking branch 'origin/master' into foldermove2Alexander Harkness2013-11-241-0/+33
| | | | | Conflicts: GNUmakefile
* Moved source to srcAlexander Harkness2013-11-241-0/+2668