summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.h (unfollow)
Commit message (Expand)AuthorFilesLines
2020-09-03Rename AddEntityIfNotPresent to AddPlayerTiger Wang1-3/+2
2020-08-28Simplify MoveEntityToNewChunkTiger Wang1-1/+1
2020-08-28Clean up GenerateChunk/TouchChunkTiger Wang1-9/+2
2020-08-28ChunkMap: do not wantonly make empty chunksTiger Wang1-29/+3
2020-08-28Remove unneeded MarkDirty, SendToClients parameters of SetMetaTiger Wang1-3/+1
2020-08-21Remove level of indirection in cChunk storageTiger Wang1-12/+12
2020-08-04OnBroken/OnPlaced are for entity actionsTiger Wang1-8/+0
2020-08-02Remove unused block tick related cChunk functionsTiger Wang1-3/+0
2020-04-17More Vector3 in cBlockHandler (#4644)Mattes D1-3/+5
2020-03-27 Lock hopper when powered by redstone (#4347)Bond-0091-0/+6
2019-10-28Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D1-21/+33
2019-10-16Refactored block-to-pickup conversion. (#4417)Mattes D1-19/+12
2019-09-24NBTChunkSerializer: Cleaned up interface.Mattes D1-3/+5
2018-07-24Broadcast refactor (#4264)peterbell101-29/+0
2017-09-25BroadcastBlockBreakAnimation and BroadcastBlockEntity use vectors (#4038)Bond-0091-2/+2
2017-09-19Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors (#3959)Lane Kolbly1-3/+3
2017-09-11Replace ItemCallbacks with lambdas (#3993)peterbell101-47/+45
2017-09-02Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot1-45/+48
2017-09-01Replace ItemCallbacks with lambdas (#3948)peterbell101-48/+45
2017-08-21Fully implemented leashes (#3798)Pablo Beltrán1-0/+2
2017-08-17Changed int parameters to vector parameters in cCuboid and simulators (#3874)Lane Kolbly1-2/+15
2017-08-07Changed entity ownership model to use smart pointersTiger Wang1-4/+5
2017-08-04Fixed compilation for clang 4.0 & gcc 7.1Dan Čermák1-0/+2
2017-08-03Removed unused forward declarations (#3888)Lukas Pioch1-4/+0
2017-08-01cWorld::SendBlockTo take player by refpeterbell101-1/+1
2017-07-16Simulators: Added area-based wakeup.Mattes D1-3/+0
2017-07-07Added bed entity (#3823)Lukas Pioch1-0/+6
2017-06-13FastRandom rewrite (#3754)peterbell101-2/+1
2017-01-18DeadlockDetect now lists some tracked CS's stats.Mattes D1-0/+7
2016-12-16Initial support for the 1.11 protocol.Mattes D1-1/+1
2016-10-12Spectators added (#2852)bibo381-0/+3
2016-09-03Configurable dirty unused chunk cap to avoid RAM overuse (#3359)LogicParrot1-1/+4
2016-08-03Simplified cChunkMap chunk storage (#2565)Tiger Wang1-82/+33
2016-07-18Updated API documentation.Mattes D1-1/+1
2016-06-03Makes tall grass and large flowers bonemealableQUSpilPrgm1-0/+3
2016-06-03Update Dispensers and let them act more like in VanillaQUSpilPrgm1-6/+6
2016-05-141.9 / 1.9.2 / 1.9.3 / 1.9.4 protocol support (#3135)Pokechu221-1/+2
2016-05-01Fix Crash on stopping the server (#3176)LogicParrot1-0/+1
2016-04-24ChunkLayers now stored in std::mapLogicParrot1-3/+3
2016-04-24Revert "ChunkLayers now stored in std::map"LogicParrot1-3/+3
2016-04-23ChunkLayers now stored in std::mapLogicParrot1-3/+3
2016-04-22Reduced unnecessary block updatesLogicParrot1-2/+1
2016-04-16Updated cChunk::SetMeta, fixed grass growth, reduced markDirty/setMeta usageLogicParrot1-1/+1
2016-02-05Bulk clearing of whitespaceLogicParrot1-67/+67
2015-12-18Reorganised the redstone simulatorTiger Wang1-7/+0
2015-12-13allow use failures to propagate from the entity/block to the playerGargaj1-2/+3
2015-11-24Add enum for Sound and Particle EffectsDave Tucker1-1/+2
2015-11-03Implemented brewingLukas Pioch1-0/+9
2015-09-24Add new "ForEach" function: ForEachLoadedChunk.tycho1-0/+3
2015-08-18Some warning fixesJulian Laubstein1-1/+1
2015-07-31Unified the doxy-comment format.Mattes D1-1/+1
2015-06-10Reinstate "Chunk queue collapsing"Tiger Wang1-1/+0
2015-06-07Revert "Chunk queue collapsing"worktycho1-0/+1
2015-06-05Rewrote ChunkSending queue for significantly improved performancetycho1-1/+1
2015-06-05Moved Chunk Broadcasts over to the regular queuetycho1-2/+1
2015-05-30Made cLightingThread own its callbackstycho1-1/+1
2015-05-09CheckBasicStyle: checks spaces around * and &.Mattes D1-6/+7
2015-05-07Added support for additional data in the ParticleEffect Packettycho1-0/+3
2015-03-21Changed cEntity::m_UniqueID to UInt32.Mattes D1-24/+43
2015-01-11Initial convertion of a_Dt to std::chronoTycho1-2/+2
2014-12-24Refactored all player block placing to go through hooks.Mattes D1-4/+19
2014-12-10Added a cWorld:PrepareChunk function.Mattes D1-0/+14
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-25/+25
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-25/+25
2014-10-15Functions in cPluginManager get references instead of pointers.Mattes D1-1/+1
2014-09-12Fixed farmland issues.Howaner1-2/+2
2014-09-111.8: Added ParticleEffect packet.Howaner1-1/+1
2014-09-05Rewritten chunk status to specify whether the chunk is in queue.Mattes D1-6/+3
2014-09-03Added cWorld::ForEachEntityInBox()madmaxoft1-0/+6
2014-08-28remove y-coord from chunksLO1ZB1-7/+7
2014-07-30Exported the beacon.Howaner1-0/+5
2014-07-24Added a queue for setting chunk data.madmaxoft1-15/+5
2014-07-21Style: Normalized to no spaces before closing parenthesis.madmaxoft1-4/+4
2014-07-17Fixed basic whitespace problems.madmaxoft1-3/+3
2014-07-13Changed BroadcastSoundEffect function to take floating pos.Howaner1-1/+1
2014-07-13Fixed wrong types. (BLOCKTYPE -> NIBBLETYPE)Howaner1-3/+3
2014-07-10Implemented support for forced chunk ticking.madmaxoft1-0/+7
2014-07-07Implemented trapped chests & othersTiger Wang1-1/+2
2014-06-27Added generic entity-collecting.Mattes D1-0/+1
2014-06-17Add DoWithBlockEntityAt() to WorldInterface.hHowaner1-2/+2
2014-06-16Fixed gcc compilation.madmaxoft1-1/+1
2014-06-16Merge branch 'master' of github.com:mc-server/MCServerTycho1-1/+26
2014-06-16Added overrideTycho1-3/+3
2014-06-14Changed names of callbacksTycho1-3/+3
2014-06-14Reformated ChunkMap.hTycho1-2/+5
2014-06-14Added generic Allocation Pool InterfaceTycho1-4/+4
2014-06-14fixed spacesTycho1-1/+1
2014-06-14fixed spacesTycho1-4/+4
2014-06-14Added loggingTycho1-3/+12
2014-06-10Fixed a race condition when adding a player to a world.madmaxoft1-0/+4
2014-05-25Hopefully fixed piston duplication issuesTiger Wang1-1/+1
2014-05-23Implemented Allocation Pool use by cChunkDataTycho1-1/+14
2014-05-18Fixed issue with types not being defined for an unused parameterTycho1-1/+2
2014-03-07Add Lua Bindings for FlowerPotEntity.h and add documentation.Howaner1-2/+2
2014-03-07Add Flower PotsHowaner1-0/+5
2014-02-23Rename SkullEntity to MobHeadEntityHowaner1-4/+4
2014-02-23Add Heads completelyHowaner1-0/+5
2014-02-19Rename SkullEntity to MobHeadEntityHowaner1-4/+4
2014-02-18Add Heads completelyHowaner1-0/+5
2014-02-18Added cWorld:SetAreaBiome() API function.madmaxoft1-0/+9
2014-02-08Initial ChunkStay code.madmaxoft1-110/+89
2014-02-01Changed pointers to referencesTycho1-1/+1
2014-01-26Refactored cBlockHandler::OnUse and dependentsTycho1-1/+8
2014-01-18Basic command block implementationandrew1-9/+14
2013-12-22Implented BroadcastParticleEffectSTRWarrior1-0/+1
2013-12-15This adds the cWorld::BroadcastEntityEffect and cWorld::BroadcastRemoveEntityEffect functions.STRWarrior1-0/+2
2013-12-14Implemented note block playing and fixed wireTiger Wang1-0/+5
2013-12-07Renamed animation functionTiger Wang1-1/+1
2013-12-06Fixed duplication glitch with QueueSetBlockTiger Wang1-1/+1
2013-11-30Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft1-0/+3
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-20Added cWorld:ForEachBlockEntityInChunk() and cWorld:DoWithBlockEntityAt() functions.madmaxoft1-2/+9
2013-09-08Adding an Empty shell that would launch mob spawner - not called yetmgueydan1-3/+8
2013-09-07Adding mob census (sorry this is a big commit as work was done before git integration i couldn't split it more)mgueydan1-0/+8
2013-09-07Renamed cWorld::DoExplosiontAt() to cWorld::DoExplosionAt()madmaxoft1-1/+1
2013-08-18Implemented cWorld:QueueSetBlock(), as requested for delayed blocksetting.madmaxoft1-0/+1
2013-08-18Removed SetServerBlock griefing.madmaxoft1-1/+0
2013-08-18Properly fixed piston non-animationTiger Wang1-0/+1
2013-08-09Added OnExploding() and OnExploded() hooks.madmaxoft1-1/+1
2013-08-03Added cWorld::DoWithChunk() function.madmaxoft1-0/+4
2013-07-07Improved function names for protocol packet sending; alpha-sorted the function listsmadmaxoft@gmail.com1-43/+16
2013-07-01Rewritten entity-on-fire management ("forever on fire" bugs)madmaxoft@gmail.com1-1/+1
2013-06-21Simulators are woken up after an explosion.madmaxoft@gmail.com1-0/+3
2013-06-18More TNT fixes.madmaxoft@gmail.com1-2/+2
2013-06-15First attempt at fixing the inter-threading deadlocks between the tick thread and the socket threadmadmaxoft@gmail.com1-0/+3
2013-06-12Added cWorld::SetSignLines(), re-exported to Lua manually to avoid ghost return valuesmadmaxoft@gmail.com1-2/+3
2013-05-28Chunk / ChunkMap: Added support for unbounded querying blocktype-only or blockmeta-onlymadmaxoft@gmail.com1-2/+8
2013-05-26Implemented droppersmadmaxoft@gmail.com1-5/+21
2013-05-25Fixed the cWorld:DoWithChestAt(), DoWithDispenserAt() and DoWithFurnaceAt() callbacks binding.madmaxoft@gmail.com1-2/+2
2013-05-04Explosion: Switched from a cube to a sphere. Implemented using cBlockArea and moved block changing code to ChunkMapkeyboard.osh@gmail.com1-0/+3
2013-04-13Proper entity removal functionsmadmaxoft@gmail.com1-6/+3
2013-04-13Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com1-20/+44
2013-03-18Added support for the packet #28 (0x1C): ENTITY_VELOCITYkeyboard.osh@gmail.com1-0/+3
2013-03-03Player can sit in minecarts (but not move them yet)madmaxoft@gmail.com1-0/+2
2013-02-28Simulators now have direct access to the cChunk object in the WakeUp() callmadmaxoft@gmail.com1-2/+5
2012-12-27Fixed slab usage in creative modeluksor111@gmail.com1-2/+2
2012-12-26Dispensers can dispense items and liquids nowluksor111@gmail.com1-0/+6
2012-12-19Added dispensers (they can't dispense items yet)luksor111@gmail.com1-3/+5
2012-12-14cChunk now tracks its neighbors as direct pointers; used in UnboundedRelGetBlock et al.madmaxoft@gmail.com1-5/+19
2012-11-11Removed an unused obsolete function chain - cWorld::GetChunkBlockData()madmaxoft@gmail.com1-4/+1
2012-10-26Fixed a valgrind warning in BlockDirt.madmaxoft@gmail.com1-2/+2
2012-10-21Added jukeboxes (patch contributed by Luksor)madmaxoft@gmail.com1-0/+2
2012-10-20Made cWorld's block query functions more orthogonal, added GetBlockInfo() returning all info on a block.madmaxoft@gmail.com1-6/+9
2012-10-14Floody fluid simulator now dries up correctly, too.madmaxoft@gmail.com1-0/+3
2012-10-06BlockArea writing support (BlockTypes with BlockMeta only)madmaxoft@gmail.com1-0/+4
2012-10-03Moved blockticking into blockhandler classes.madmaxoft@gmail.com1-2/+2
2012-09-29Beds can be slept in now (it doesn't change the time though)faketruth1-0/+2
2012-09-25Added the block dig animation packet (patch contributed by l0udPL)madmaxoft@gmail.com1-0/+2
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-0/+0
2012-09-11Merged in a patch for sounds by l0udPLmadmaxoft@gmail.com1-0/+2
2012-08-31Progress on the 1.3.2 protocol.madmaxoft@gmail.com1-1/+1
2012-08-29Gotten completely rid of all cPackets. The cProtocol125 class now does all the parsing and writing by itself.madmaxoft@gmail.com1-2/+2
2012-08-27Cut out all packet handling to a separate cProtocol descendantmadmaxoft@gmail.com1-8/+0
2012-08-26git-svn-id: http://mc-server.googlecode.com/svn/trunk@795 0a769ca7-a7f5-676a-18bf-c427514a06d6madmaxoft@gmail.com1-0/+3
2012-08-25cWorld doesn't use cPackets.madmaxoft@gmail.com1-0/+2
2012-08-24cPickup doesn't use cPackets.madmaxoft@gmail.com1-0/+3
2012-08-24Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets.madmaxoft@gmail.com1-0/+8
2012-08-19Window, Chest, Furnace and Pawn are not using cPackets at allmadmaxoft@gmail.com1-0/+5
2012-08-19Almost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle.madmaxoft@gmail.com1-0/+17
2012-08-19Another handful of packets rewritten.madmaxoft@gmail.com1-0/+6
2012-07-02cBlockArea object added (with only minimal testing so far)madmaxoft@gmail.com1-0/+3
2012-06-17Removed the deprecated GetBlockEntity(), added several enumerators to replace it.madmaxoft@gmail.com1-1/+20
2012-06-16Exported cWorld::ForEachEntity and cWorld::ForEachEntityInChunk; no idea if they actually workmadmaxoft@gmail.com1-0/+4
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-281/+281
2012-06-09Cacti grow by themselves and by bonemealmadmaxoft@gmail.com1-0/+3
2012-06-08Sugarcane grows and can be grown using bonemeal.madmaxoft@gmail.com1-0/+3
2012-06-07Bonemeal works on crops, melons, pumpkins, saplings and grass. Plant growing has been refactored into separate functions callable from Lua, too.madmaxoft@gmail.com1-0/+3
2012-06-07Repeaters' delays can be set by rclkmadmaxoft@gmail.com1-0/+1
2012-06-06Item-dropping code rewritten and centralized - now there's only one place to modify if we want to split or merge same-item drops: cWorld:SpawnItemPickups(). Also, mined blocks can now drop more items, and they recognize if they're being mined by the correct tool.madmaxoft@gmail.com1-2/+2
2012-05-30Added support for SetNextBlockTick() function callable from Luamadmaxoft@gmail.com1-0/+3
2012-05-29Added code for the chunks to manipulate their neighbors while ticking. Also added some basic farming support - melon and pumpkin growing code. Untested and untestable so far, will test and fix later.madmaxoft@gmail.com1-2/+10
2012-05-25Merged the composable_generator branch into the trunkmadmaxoft@gmail.com1-14/+39
2012-04-10Added the "/regeneratechunk" command that regenerates either current chunk or a chunk specified with x, z parameters. TODO: permissions - we don't want guests erasing our chunks!madmaxoft@gmail.com1-0/+3
2012-03-22Fixed a deadlock by removing clients from all chunks upon their exit, not using the clients chunklists.madmaxoft@gmail.com1-2/+4
2012-03-16Exposed a function to Lua to get a block's sky light valuefaketruth1-0/+1
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-46/+48
2012-03-09cClientHandles have a unique ID now to distinguish themfaketruth1-1/+1
2012-03-05ChunkSender: Chunks are now compressed and sent to clients from a separate threads, proper passive waiting between threads. Not much tested, just appears to work :)madmaxoft@gmail.com1-3/+6
2012-03-03Got rid of some hardcoded numbers, now using hardcoded variables! woofaketruth1-6/+6
2012-02-28Chunk now has an indicator of load failure; Chunk generator uses cChunkStaymadmaxoft@gmail.com1-0/+3
2012-02-28Implemented synchronous chunk loading; optimized cChunkStay interface for speed (though still unused ;)madmaxoft@gmail.com1-6/+22
2012-02-28Const-correctness for packet broadcasting (fixes GCC compilation)madmaxoft@gmail.com1-2/+2
2012-02-26New cChunkStay class for temporarily keeping chunks loaded even when then have no clients. For now unused, will be used by generator and lighting in the future.madmaxoft@gmail.com1-0/+30
2012-02-23Plain pointer cChunkPtr finishing touches; removed cChunk's critical sectionsmadmaxoft@gmail.com1-0/+1
2012-02-21Removed cChunkPtrs from everywhere but internal cChunkMap usage. Now we should finally be threadsafe :)madmaxoft@gmail.com1-4/+18
2012-02-21Fixed heightmap optimization from rev 302; removed a few more cChunkPtrsmadmaxoft@gmail.com1-0/+9
2012-02-21Fixed block-getting so that simulators work againmadmaxoft@gmail.com1-0/+2
2012-02-20Removed some more cChunkPtr usagemadmaxoft@gmail.com1-1/+16
2012-02-18Substantial cWorld::FastSetBlock() speed up by queueing all such calls and processing them later chunk-wise (makes growing trees in the generator fast again)madmaxoft@gmail.com1-0/+1
2012-02-18Re-implemented tree-growing. May produce artefacts on old-world / new-world boundaries.madmaxoft@gmail.com1-0/+1
2012-02-18Thread-safe chunk generation, storage and generator are queried for progress while initializing servermadmaxoft@gmail.com1-9/+12
2012-02-17Chunk coords mostly "upgraded" to include the Y coord for future compatibilitymadmaxoft@gmail.com1-9/+3
2012-02-16cWorldGenerator speedup - doesn't call GetChunk() anymore, not queueing the chunk it's generating to be loaded recursively.madmaxoft@gmail.com1-7/+8
2012-02-16Chunk is now marked as dirty; saving only dirty chunks; rewritten load / save not to use cChunkPtr; set VC2008 project to level4 warnings; block entities are now loaded and saved properlymadmaxoft@gmail.com1-2/+10
2012-02-16Chunks are properly saved before being unloaded nowfaketruth1-1/+8
2012-02-15Restored chest and furnace functionality as it was (it's basically working but joined chests show single-chest window)madmaxoft@gmail.com1-1/+34
2012-02-14Slight cleanup - removed old code, some additional comments on dangerous functionsmadmaxoft@gmail.com1-2/+2
2012-02-13Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it.madmaxoft@gmail.com1-48/+41
2012-02-08Removed unused codemadmaxoft@gmail.com1-1/+0
2012-02-08MTRand class is not created in each tick, therefore much improving tick-thread time (now uses ~5 % CPU instead of one full core)madmaxoft@gmail.com1-1/+18
2012-01-30Initial cFile implementation (using stdio FILE) and test in cChunkMapmadmaxoft@gmail.com1-2/+3
2012-01-29Old code begone! ChunkMap cleanupmadmaxoft@gmail.com1-22/+1
2012-01-01Fixed the numchunks console command.faketruth1-0/+2
2011-12-25Chunks are generated in a separate thread allowing players to keep on playing and chatting while chunks are generated. This means, however, that cWorld::GetChunk() does not always return a chunk and is something you need to be aware of. I am not entirely sure if all this is completely stable, but I think so :Ofaketruth1-0/+2
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-1/+3
2011-10-29Added denotch map converter. Program currently reads the only mcr file in the region dir and writes the uncompressed chunk data in world/X0-Z0.pak. I compile in linux with "g++ cConvert.cpp -lz -o denotch"admin@omencraft.com1-1/+1
2011-10-03MCServer c++ source filesfaketruth1-0/+91