summaryrefslogtreecommitdiffstats
path: root/source/World.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Clients are deleted when the world is stopped.madmaxoft2013-08-141-0/+11
| | | | This fixes #92.
* Fixed crashes in world's clientlist manipulatorsmadmaxoft2013-08-141-2/+22
|
* Clients are now ticked in cServer first, then in cWorld once they get assigned a world.madmaxoft2013-08-131-8/+58
|
* Removed cServer::BroadcastChat() and cServer::SendMessage().madmaxoft2013-08-121-1/+1
| | | | These two functions make it difficult to move to the new ticking system, and they aren't used anyway. If so required, they can be emulated by ForEachWorld / ForEachPlayer calls.
* Merge branch 'master' into PerWorldThreadsmadmaxoft2013-08-121-0/+7
|\
| * Now Endermans spawn in The Endtonibm192013-08-111-0/+7
| |
* | Added cWorld:QueueSaveAllChunks() function for saving chunks asynchronously.madmaxoft2013-08-111-1/+55
| | | | | | | | The cWorld:SaveAllChunks() is therefore deprecated in the API and will be removed soon, use QueueSaveAllChunks() instead.
* | Each world now ticks in a separate thread.madmaxoft2013-08-111-97/+107
| |
* | Moved MaxPlayers and Description from cWorld to cServer.madmaxoft2013-08-111-23/+50
|/ | | | Also started creating a new cWorld::cTickThread class, but not used yet.
* Added OnExploding() and OnExploded() hooks.madmaxoft2013-08-091-4/+10
| | | | | | | | As requested in FS 413, with extra parameters: World, BlockX, BlockY, BlockZ, Size, CanCauseFire, Source, SourceData OnExploding() can return 3 values: StopHook, CanCauseFire, ExplosionSize
* Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.madmaxoft2013-08-081-2/+12
| | | | As requested in FS 418.
* Merge pull request #48 from mc-server/BlockTracingmadmaxoft2013-08-071-0/+66
|\ | | | | Block tracing
| * cWorld: Added a self-test for LineBlockTracer, disabled by an #ifdef.madmaxoft2013-08-041-0/+57
| |
| * Added cWorld::DoWithChunk() function.madmaxoft2013-08-031-0/+9
| | | | | | | | This will be used by the blocktracers to gain direct access to chunk data.
* | Now zombies spawn in Overworld during nighttonibm192013-08-061-4/+3
|/
* Implemented the actual tab completion for commands and playernames.madmaxoft2013-07-311-6/+10
| | | | Each command is reported only if the player has the permission to use it.
* Tab completion packet is handled and sent.madmaxoft2013-07-301-0/+14
| | | | This only handles the network comm and the overall design logic, the actual completion is not yet implemented, only dummy values are returned for now.
* Mobs are assigned MaxHealth from monsters.ini; reading monsters.ini doesn't need settings.ini values anymore.madmaxoft@gmail.com2013-07-071-0/+1
| | | | | | Fixes FS #409. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1662 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Improved function names for protocol packet sending; alpha-sorted the function listsmadmaxoft@gmail.com2013-07-071-80/+80
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1659 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed player moving between worlds.madmaxoft@gmail.com2013-07-031-0/+2
| | | | | | | Fixes FS #407. Also fixes a few possible deadlocks between SocketThreads and TickThread git-svn-id: http://mc-server.googlecode.com/svn/trunk@1641 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Rewritten entity-on-fire management ("forever on fire" bugs)madmaxoft@gmail.com2013-07-011-25/+27
| | | | | | | | | Fixes FS #297 and part of FS #403. Added sizes to all entities. Moved all damage-related functions from cPawn to cEntity API change: renamed cPawn:TeleportTo() to cEntity:TeleportToCoords() git-svn-id: http://mc-server.googlecode.com/svn/trunk@1635 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Unified the way mobs are spawned (egg vs natural). Fixed deadlocks in mob moving. Fixed mob destroying code.madmaxoft@gmail.com2013-06-251-41/+31
| | | | | | Should fix FS #400 and partially fix FS #381 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1626 0a769ca7-a7f5-676a-18bf-c427514a06d6
* The weather doesn't change if the dimension is not Overworld.nielsbreu@gmail.com2013-06-241-0/+6
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1624 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added the End height and composition generators.madmaxoft@gmail.com2013-06-221-2/+3
| | | | | | Also made the dimension in world.ini specifiable by a string. Exported StringToDimension() and StringToBiome() to Lua API. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1621 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Dispensers dispense primed TNTmadmaxoft@gmail.com2013-06-211-2/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1617 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Simulators are woken up after an explosion.madmaxoft@gmail.com2013-06-211-0/+10
| | | | | | Fixes FS #391 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1615 0a769ca7-a7f5-676a-18bf-c427514a06d6
* More TNT fixes.madmaxoft@gmail.com2013-06-181-3/+15
| | | | | | | | Chain-reaction TNTs are spawned in proper coordinates (FS #390) Centralized Primed TNT entity spawning and made available to the plugins. Internal changes for better TNT performance. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1604 0a769ca7-a7f5-676a-18bf-c427514a06d6
* TNT fixes.madmaxoft@gmail.com2013-06-181-2/+2
| | | | | | | | | Other blocks can be placed next to TNT. Explosions activate nearby TNT blocks. TNT doesn't destroy bedrock, obsidian and liquid blocks. Server doesn't crash when a TNT (or other entity) leaves the valid Y range. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1603 0a769ca7-a7f5-676a-18bf-c427514a06d6
* First attempt at fixing the inter-threading deadlocks between the tick thread and the socket threadmadmaxoft@gmail.com2013-06-151-0/+12
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1591 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added cWorld::SetSignLines(), re-exported to Lua manually to avoid ghost return valuesmadmaxoft@gmail.com2013-06-121-4/+17
| | | | | | FS #364 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1582 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Implemented droppersmadmaxoft@gmail.com2013-05-261-0/+36
| | | | | | 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
* Temporarily set all pickups to spawn in the middle of the block from which they fall.madmaxoft@gmail.com2013-05-121-9/+25
| | | | | | (Additional fix for FS #338) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1478 0a769ca7-a7f5-676a-18bf-c427514a06d6
* cWorld: Temporary fix for FS #338madmaxoft@gmail.com2013-05-121-0/+9
| | | | | | The pickups get spawned with zero speed, not to mess up their physics simulation. Marked as temporary, remove when physics are completed. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1474 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Explosion: Switched from a cube to a sphere. Implemented using cBlockArea and moved block changing code to ChunkMapkeyboard.osh@gmail.com2013-05-041-31/+4
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1441 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Slight performance improvements in cWorld::DoExplosiontAt()madmaxoft@gmail.com2013-04-191-3/+5
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1397 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed Linux compilation, slight code cleanupmadmaxoft@gmail.com2013-04-191-25/+25
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1396 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Initial implementation of explosions and TNT blockkeyboard.osh@gmail.com2013-04-181-0/+62
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1392 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Proper entity removal functionsmadmaxoft@gmail.com2013-04-131-10/+10
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1386 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com2013-04-131-102/+55
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added carrots and potatoes handling, bonemealing and proper lighting.madmaxoft@gmail.com2013-04-051-3/+31
| | | | | | FS #166 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1359 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Proper fix for FS #347. Also unification of ticking block entities.madmaxoft@gmail.com2013-04-011-11/+11
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1348 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Hotfix for FS #347.madmaxoft@gmail.com2013-04-011-7/+13
| | | | | | This is not meant to be a permanent solution, but should provide insight into why the issue happens. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1347 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added support for the packet #28 (0x1C): ENTITY_VELOCITYkeyboard.osh@gmail.com2013-03-181-0/+8
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1283 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed the Classic fluid simulator, it was too unstable (2nd attempt)madmaxoft@gmail.com2013-03-141-2/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1275 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed the Classic fluid simulator, it was too unstablemadmaxoft@gmail.com2013-03-141-17/+7
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1274 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added a Noop fluid simulator that doesn't do anything with the fluid (fluid doesn't spread at all, behaves like a normal block)madmaxoft@gmail.com2013-03-141-0/+10
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1272 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added a Vaporize fluid simulator that simply replaces fluid blocks with air.madmaxoft@gmail.com2013-03-141-0/+8
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1270 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Initial nether composition generatormadmaxoft@gmail.com2013-03-111-0/+16
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1266 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Player can sit in minecarts (but not move them yet)madmaxoft@gmail.com2013-03-031-41/+50
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1249 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Rewritten SandSimulator to use direct chunk access; and sand falling on torches now creates a pickup.madmaxoft@gmail.com2013-03-021-5/+5
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1240 0a769ca7-a7f5-676a-18bf-c427514a06d6
* New fire simulator, fully rewritten to the new scheme of things, directly accessing chunk data.madmaxoft@gmail.com2013-03-011-2/+2
| | | | | | http://forum.mc-server.org/showthread.php?tid=617&pid=6626#pid6626 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1233 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Converted simulators to take cWorld reference instead of a pointermadmaxoft@gmail.com2013-02-281-6/+6
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1228 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Simulators now have direct access to the cChunk object in the WakeUp() callmadmaxoft@gmail.com2013-02-281-1/+9
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1227 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added HOOK_WEATHER_CHANGING.madmaxoft@gmail.com2013-02-131-88/+58
| | | | | | 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
* Simplified cWorld::FindAndDoWithPlayer()madmaxoft@gmail.com2013-02-011-11/+8
| | | | | | It should still work the same - call the callback for the player with the most similar name. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1184 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com2013-01-121-46/+36
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Floody fluid simulator can create sourceblocks (configurable in World.ini)madmaxoft@gmail.com2013-01-041-5/+4
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1119 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Dispensers can dispense items and liquids nowluksor111@gmail.com2012-12-261-0/+18
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1105 0a769ca7-a7f5-676a-18bf-c427514a06d6
* MTRand reference is now passed as a Tick() parameter so that it isn't created and destroyed over and over again. All entities will handle physics (empty callback for now)madmaxoft@gmail.com2012-12-221-1/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1096 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed time calculation in cWorld::Tick()madmaxoft@gmail.com2012-12-171-2/+2
| | | | | | Should fix chunk saving bug in http://forum.mc-server.org/showthread.php?tid=434&pid=5663#pid5663 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1079 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Android: Made the initial pre-calculated spawn area smallerfaketruth2012-11-161-1/+1
| | | | | | | | | Android: Fixed FastNBT Android: Fixed level.dat reading/writing GroupManager uses groups.example.ini as default WebAdmin uses webadmin.example.ini as default git-svn-id: http://mc-server.googlecode.com/svn/trunk@1049 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed an unused obsolete function chain - cWorld::GetChunkBlockData()madmaxoft@gmail.com2012-11-111-9/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1036 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Refactored the world time.madmaxoft@gmail.com2012-11-011-57/+40
| | | | | | Now it is stored in two values - WorldAge (only incremented, plugins cannot change) and TimeOfDay (plugins can change). Since sub-tick precision is needed in Tick(), we store it both as number of seconds (double) and number of ticks (Int64) is calculated off of that. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1022 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added Bats and Witches.luksor111@gmail.com2012-11-011-0/+4
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1021 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed gcc compilationmadmaxoft@gmail.com2012-10-281-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1017 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added cWorld:SpawnMob(PosX, PosY, PosZ, EntityType) to Lua APImadmaxoft@gmail.com2012-10-281-10/+59
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1014 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed a valgrind warning in BlockDirt.madmaxoft@gmail.com2012-10-261-4/+4
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1011 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed up a few valgrind warningsmadmaxoft@gmail.com2012-10-251-7/+8
| | | | | | ( http://forum.mc-server.org/showthread.php?tid=598&pid=5071#pid5071 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1010 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Top blocks are now snowed over, either normally, or in deep snow (patch contributed by funmaker, Luksor and Sebi)madmaxoft@gmail.com2012-10-211-0/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1000 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added jukeboxes (patch contributed by Luksor)madmaxoft@gmail.com2012-10-211-2/+11
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@994 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Made cWorld's block query functions more orthogonal, added GetBlockInfo() returning all info on a block.madmaxoft@gmail.com2012-10-201-0/+18
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@986 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed DelayedFluidSimulator.madmaxoft@gmail.com2012-10-151-3/+6
| | | | | | Floody fluid simulator is now woken up properly across chunk borders. git-svn-id: http://mc-server.googlecode.com/svn/trunk@966 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Floody fluid sim: reads params from world.ini; water and lava react together into cobblestone / stone / obsidianmadmaxoft@gmail.com2012-10-141-5/+8
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@965 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Initial Floody fluid simulator.madmaxoft@gmail.com2012-10-141-13/+13
| | | | | | Can spread, cannot dry. git-svn-id: http://mc-server.googlecode.com/svn/trunk@963 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Preparation for multiple fluid simulators.madmaxoft@gmail.com2012-10-131-11/+54
| | | | | | | | | Moved all simulators into a subfolder. Replaced cWaterSimulator and cLavaSimulator with a generic cFluidSimulator. Moved original fluid simulation into cClassicFluidSimulator. Fluid simulator parameters (MaxHeight, Falloff) are read from the world.ini file (can have nether-like lava with lower falloff) git-svn-id: http://mc-server.googlecode.com/svn/trunk@956 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added delayed ticking to Lua APImadmaxoft@gmail.com2012-10-131-24/+41
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@953 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added an option to disable/enable PVP on a per world basisfaketruth2012-10-101-1/+2
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@944 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Completely removed the old (buggy) redstone simulator.madmaxoft@gmail.com2012-10-061-10/+5
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@937 0a769ca7-a7f5-676a-18bf-c427514a06d6
* BlockArea writing support (BlockTypes with BlockMeta only)madmaxoft@gmail.com2012-10-061-0/+9
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@933 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed saplings not growing into treesmadmaxoft@gmail.com2012-10-031-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@924 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Moved blockticking into blockhandler classes.madmaxoft@gmail.com2012-10-031-2/+20
| | | | | | Also slightly refactored the variable / argument names (BlockID is deprecated, use BlockType instead) git-svn-id: http://mc-server.googlecode.com/svn/trunk@921 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Beds can be slept in now (it doesn't change the time though)faketruth2012-09-291-0/+9
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@911 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Unified folder name-casingmadmaxoft@gmail.com2012-09-291-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@902 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added the block dig animation packet (patch contributed by l0udPL)madmaxoft@gmail.com2012-09-251-0/+9
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@892 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com2012-09-241-0/+2097
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6