summaryrefslogtreecommitdiffstats
path: root/src/World.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-12-15This adds the cWorld::BroadcastEntityEffect and cWorld::BroadcastRemoveEntityEffect functions.STRWarrior1-0/+18
2013-12-14Implemented note block playing and fixed wireTiger Wang1-0/+9
Game of Thrones music in Minecraft, here I come!
2013-12-10Improved pickups spawning speed againTiger Wang1-4/+4
2013-12-08Now spawn points will not be in deep oceans or rivers etc.STRWarrior1-1/+1
2013-12-08Moved bindings-related to a Bindings subfolder.madmaxoft1-2/+1
Ref.: #407
2013-12-08Bonemeal has particles, fixes #393Tiger Wang1-0/+6
2013-12-07Added a SpawnFallingBlock function so plugins can make other blocks fall.STRWarrior1-0/+12
2013-12-07Renamed animation functionTiger Wang1-2/+2
Renamed BroadcastPlayerAnimation to BroadcastEntityAnimation. Not just players can have animations, you know.
2013-12-06Fixed duplication glitch with QueueSetBlockTiger Wang1-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.
2013-12-06Added pickup invalid item checkTiger Wang1-0/+11
They aren't spawned at all if their itemtype isn't valid; possibly fixes the client crashing with bad pickups.
2013-12-04Lava can spawn fire.madmaxoft1-0/+1
Settable in world.ini, lava can spawn fire to fuel blocks near it. Fix #65.
2013-11-30Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft1-2/+2
2013-11-30Explicitly set spawnpoint fixes.madmaxoft1-20/+11
The value names are case-insensitive. The debug message is printed only once.
2013-11-30Added the real tick duration to the OnWorldTick hook.madmaxoft1-9/+10
2013-11-27Made TNT pickups spawning chance 25%Tiger Wang1-1/+1
2013-11-26Fixed another one.Alexander Harkness1-1/+1
2013-11-24Attempt to fix compilationTiger Wang1-1/+1
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-20Added cWorld:ForEachBlockEntityInChunk() and cWorld:DoWithBlockEntityAt() functions.madmaxoft1-0/+18
Also exported them to the Lua API.
2013-11-10Bundled fixes [SEE DESC]Tiger Wang1-2/+1
* Fixed compiler warning in Monster.cpp * Future proofed particle effects * Improved pickups, made less jittery
2013-11-10Bundled fixes [SEE DESC]Tiger Wang1-3/+5
* Fixed pickups spawning in an incorrect position from a JukeBox * Pickups make a popping sound in Prtcl1.7 * Arrows make a *what sort of sound does an arrow make anyway‽* when hitting a block, and a popping sound when fired * Mobs again have metadata * Fixed Prtcl1.7 not using valid JSON to kick a client * Minecarts and arrows again have metadata
2013-11-04Autogeneration of settings.ini and webadmin.iniTiger Wang1-3/+3
Fixes issue #75
2013-10-30Fixed a compiler warning.madmaxoft1-26/+31
Also updated code to match our style.
2013-10-29Changes based on madmaxoft's nitpicker notes.Samuel Barney1-0/+1
2013-10-29Update to allow the light map to remain the same, but allow alteration of sky light values based on time.Samuel Barney1-1/+31
2013-10-25cIniFile doesn't store filename internally anymore.madmaxoft1-3/+3
2013-10-24Renamed cMonster::GetSpawnRate() to GetSpawnDelay().madmaxoft1-2/+2
2013-10-24Pickups now have collection delay when vomitedTiger Wang1-4/+4
Implements FS#394.
2013-10-22Temporary fix for world not locking chunkmap in TickMobs.madmaxoft1-0/+3
Reported as #283; this is a hotfix only.
2013-10-20Fixed memory leak in cMobFamilyCollecter.madmaxoft1-14/+18
2013-10-20Fixed memory leaks in cMobCensus, moved GetSpawnRate() to cMonster.madmaxoft1-20/+19
2013-10-20Fixed memory leaks in cMobSpawner.madmaxoft1-1/+1
2013-10-20Moved all MobTypesManager functions to cMonster.madmaxoft1-7/+7
This removes some of the memory leaks and is more logical in structure. Also the functions are exported to Lua.
2013-10-20Fixed loading allowed mobs in world.madmaxoft1-11/+28
2013-10-18Adapted code style.madmaxoft1-7/+5
2013-10-14Removed reading default values from settings.ini for worlds.Samuel Barney1-10/+1
2013-10-14General fixes to get the new Monster spawning code working.Samuel Barney1-6/+17
Also wrote in some code to use the default settings for monsters located in settings.ini
2013-10-14Mobs no longer spawn up in the air.Samuel Barney1-0/+2
2013-10-13Eight round of fixesTiger Wang1-1/+1
* Changed IsA() to *long if statement* - Removed deprecated values in Entity.h - to blazes with the plugins! * Renamed villager type enumerations to be LESS SHOUTY and more vt-y + Use vtMax for World.cpp testificate spawning
2013-10-12Fixed and exported cWorld:QueueTask().madmaxoft1-1/+1
This implements #220.
2013-10-12Added more ghast spawning probabilitytonibm191-4/+4
2013-10-12Added extra linetonibm191-0/+1
2013-10-12Mob spawning changestonibm191-4/+24
Added EnderDragon, Blaze and Horse spawning.
2013-10-11Fifth round of fixesTiger Wang1-3/+7
* Enumerated Villager spawning
2013-10-09Second round of fixesTiger Wang1-1/+1
* Implemented suggestions
2013-10-09Moved cMakeDir::MakeDir to cFile::CreateFolder.madmaxoft1-2/+1
And exported to Lua.
2013-10-08Initial Metadata Commit [SEE DESC]Tiger Wang1-30/+47
+ Pigs, Minecarts, Sheep, Skeletons, Slimes, Villagers, Wolves, and Horses have metadata + Base code on taming wolves, shearing sheep, and taming horses + Sheep and horses have different colours when spawned
2013-09-21Linux compilation fix #3.madmaxoft1-2/+2
2013-09-18Fixed pickupsTiger Wang1-13/+2
2013-09-18Added moar mobs!Tiger Wang1-4/+16
+ Added dragons + Added golems + Added giants + Added horses + Added some missing items + Added missing spawn egg metas
2013-09-16cWorld:QueueTickBlock takes the delay in ticks.madmaxoft1-8/+9
2013-09-15Fixed doxycomments of cWorld plant-growing codemadmaxoft1-2/+2
2013-09-10Fixed codepage conversionmadmaxoft1-1/+1
2013-09-09Added a few changes [SEE DESC]Tiger Wang1-2/+2
* Revised pickup comments * SlotArea pickup tossing now reflects Player.cpp * Removed unneeded ItemShears comment (was working already) * Sand and gravel pickups spawn with correct speed
2013-09-08Adding mobtype filter inside world.inimgueydan1-8/+13
2013-09-08Adding glue to call everything done in last commits - now the mobs are spawningmgueydan1-138/+71
2013-09-08Disabeling current mob spawning and tickmgueydan1-4/+5
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/+5
2013-09-07relockating mobs includes (they probably will end somewhere else in order not to recompile world each time you update a mob)mgueydan1-23/+1
2013-09-07Renamed cWorld::DoExplosiontAt() to cWorld::DoExplosionAt()madmaxoft1-2/+2
2013-09-04Pickups spawn with correct speed and positionTiger Wang1-29/+11
Added a comment-space as well.
2013-08-24Slight performance improvement in cWorld::FindClosestPlayer()madmaxoft1-6/+3
2013-08-22Added skeleton code for projectile spawning.madmaxoft1-3/+25
2013-08-19Fixed WorldTickThread reporting wrong time durations for each tick.madmaxoft1-8/+16
This had caused food eating to fail and players unable to collect pickups on Linux.
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-4/+4
2013-08-19Implemented the OnWorldTick hook.madmaxoft1-0/+3
Triggerred for each world every time it ticks, parameters are the cWorld and the previous tick length (a_Dt)
2013-08-18Implemented cWorld:QueueSetBlock(), as requested for delayed blocksetting.madmaxoft1-0/+9
Untested yet, so might not work.
2013-08-18Removed SetServerBlock griefing.madmaxoft1-15/+0
2013-08-18Properly fixed piston non-animationTiger Wang1-5/+23
Fixes #57
2013-08-18Enhancements to Tabcompletion and Compile FixTiger Wang1-11/+7
Tab complete now finds the last word and matches accordingly, with a 20% increase in speed! Fixed missing comma breaking compilation
2013-08-18Bugfix Update [SEE DESC}Tiger Wang1-4/+11
Added stained clay, coal block, and hardened clay Block IDs Added stained clay and carpet block Metas Fixed bug with sticky retract bailing out but not unsetting arm Fixed autocomplete not working when not at the first character, fixes #64 Added furnace recipes for hardened clay and coal and coal blocks
2013-08-16Replaced E_ENTITY_TYPE_XXX with cMonster::mtXXX.madmaxoft1-61/+79
Also slightly improved the spawning algorithm.
2013-08-14Generation and simulation defaultsTiger Wang1-2/+2
...are no longer set, instead, the server operator is told to set them.
2013-08-14Fixed world's a_Dt parameter getting time values in wrong units.madmaxoft1-1/+1
2013-08-14Clients are deleted when the world is stopped.madmaxoft1-0/+11
This fixes #92.
2013-08-14Fixed crashes in world's clientlist manipulatorsmadmaxoft1-2/+22
2013-08-14Buncha bugfixes [SEE DESC]Tiger Wang1-1/+1
Fixed generation values not being written Fixed piston being able to push water Fixed ice creating a non-source block (still doesn't update though) Removed problematic piston code
2013-08-13Clients are now ticked in cServer first, then in cWorld once they get assigned a world.madmaxoft1-8/+58
2013-08-12Removed cServer::BroadcastChat() and cServer::SendMessage().madmaxoft1-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.
2013-08-11Now Endermans spawn in The Endtonibm191-0/+7
2013-08-11Added cWorld:QueueSaveAllChunks() function for saving chunks asynchronously.madmaxoft1-1/+55
The cWorld:SaveAllChunks() is therefore deprecated in the API and will be removed soon, use QueueSaveAllChunks() instead.
2013-08-11Each world now ticks in a separate thread.madmaxoft1-97/+107
2013-08-11Moved MaxPlayers and Description from cWorld to cServer.madmaxoft1-23/+50
Also started creating a new cWorld::cTickThread class, but not used yet.
2013-08-09Added OnExploding() and OnExploded() hooks.madmaxoft1-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
2013-08-08Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.madmaxoft1-2/+12
As requested in FS 418.
2013-08-06Now zombies spawn in Overworld during nighttonibm191-4/+3
2013-08-04cWorld: Added a self-test for LineBlockTracer, disabled by an #ifdef.madmaxoft1-0/+57
2013-08-03Added cWorld::DoWithChunk() function.madmaxoft1-0/+9
This will be used by the blocktracers to gain direct access to chunk data.
2013-07-31Implemented the actual tab completion for commands and playernames.madmaxoft1-6/+10
Each command is reported only if the player has the permission to use it.
2013-07-30Tab completion packet is handled and sent.madmaxoft1-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.
2013-07-07Mobs are assigned MaxHealth from monsters.ini; reading monsters.ini doesn't need settings.ini values anymore.madmaxoft@gmail.com1-0/+1
Fixes FS #409. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1662 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07Improved function names for protocol packet sending; alpha-sorted the function listsmadmaxoft@gmail.com1-80/+80
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1659 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-03Fixed player moving between worlds.madmaxoft@gmail.com1-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
2013-07-01Rewritten entity-on-fire management ("forever on fire" bugs)madmaxoft@gmail.com1-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
2013-06-25Unified the way mobs are spawned (egg vs natural). Fixed deadlocks in mob moving. Fixed mob destroying code.madmaxoft@gmail.com1-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
2013-06-24The weather doesn't change if the dimension is not Overworld.nielsbreu@gmail.com1-0/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1624 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-22Added the End height and composition generators.madmaxoft@gmail.com1-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
2013-06-21Dispensers dispense primed TNTmadmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1617 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-21Simulators are woken up after an explosion.madmaxoft@gmail.com1-0/+10
Fixes FS #391 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1615 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-18More TNT fixes.madmaxoft@gmail.com1-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
2013-06-18TNT fixes.madmaxoft@gmail.com1-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
2013-06-15First attempt at fixing the inter-threading deadlocks between the tick thread and the socket threadmadmaxoft@gmail.com1-0/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1591 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-12Added cWorld::SetSignLines(), re-exported to Lua manually to avoid ghost return valuesmadmaxoft@gmail.com1-4/+17
FS #364 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1582 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-26Implemented droppersmadmaxoft@gmail.com1-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
2013-05-12Temporarily set all pickups to spawn in the middle of the block from which they fall.madmaxoft@gmail.com1-9/+25
(Additional fix for FS #338) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1478 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-12cWorld: Temporary fix for FS #338madmaxoft@gmail.com1-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
2013-05-04Explosion: Switched from a cube to a sphere. Implemented using cBlockArea and moved block changing code to ChunkMapkeyboard.osh@gmail.com1-31/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1441 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-19Slight performance improvements in cWorld::DoExplosiontAt()madmaxoft@gmail.com1-3/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1397 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-19Fixed Linux compilation, slight code cleanupmadmaxoft@gmail.com1-25/+25
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1396 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-18Initial implementation of explosions and TNT blockkeyboard.osh@gmail.com1-0/+62
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1392 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13Proper entity removal functionsmadmaxoft@gmail.com1-10/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1386 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com1-102/+55
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-05Added carrots and potatoes handling, bonemealing and proper lighting.madmaxoft@gmail.com1-3/+31
FS #166 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1359 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-01Proper fix for FS #347. Also unification of ticking block entities.madmaxoft@gmail.com1-11/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1348 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-01Hotfix for FS #347.madmaxoft@gmail.com1-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
2013-03-18Added support for the packet #28 (0x1C): ENTITY_VELOCITYkeyboard.osh@gmail.com1-0/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1283 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-14Removed the Classic fluid simulator, it was too unstable (2nd attempt)madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1275 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-14Removed the Classic fluid simulator, it was too unstablemadmaxoft@gmail.com1-17/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1274 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-14Added 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.com1-0/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1272 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-14Added a Vaporize fluid simulator that simply replaces fluid blocks with air.madmaxoft@gmail.com1-0/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1270 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-11Initial nether composition generatormadmaxoft@gmail.com1-0/+16
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1266 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-03Player can sit in minecarts (but not move them yet)madmaxoft@gmail.com1-41/+50
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1249 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-02Rewritten SandSimulator to use direct chunk access; and sand falling on torches now creates a pickup.madmaxoft@gmail.com1-5/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1240 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-01New fire simulator, fully rewritten to the new scheme of things, directly accessing chunk data.madmaxoft@gmail.com1-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
2013-02-28Converted simulators to take cWorld reference instead of a pointermadmaxoft@gmail.com1-6/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1228 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-28Simulators now have direct access to the cChunk object in the WakeUp() callmadmaxoft@gmail.com1-1/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1227 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-13Added HOOK_WEATHER_CHANGING.madmaxoft@gmail.com1-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
2013-02-01Simplified cWorld::FindAndDoWithPlayer()madmaxoft@gmail.com1-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
2013-01-12Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com1-46/+36
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-04Floody fluid simulator can create sourceblocks (configurable in World.ini)madmaxoft@gmail.com1-5/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1119 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-26Dispensers can dispense items and liquids nowluksor111@gmail.com1-0/+18
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1105 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-22MTRand 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.com1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1096 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-17Fixed time calculation in cWorld::Tick()madmaxoft@gmail.com1-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
2012-11-16Android: Made the initial pre-calculated spawn area smallerfaketruth1-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
2012-11-11Removed an unused obsolete function chain - cWorld::GetChunkBlockData()madmaxoft@gmail.com1-9/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1036 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-01Refactored the world time.madmaxoft@gmail.com1-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
2012-11-01Added Bats and Witches.luksor111@gmail.com1-0/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1021 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-28Fixed gcc compilationmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1017 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-28Added cWorld:SpawnMob(PosX, PosY, PosZ, EntityType) to Lua APImadmaxoft@gmail.com1-10/+59
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1014 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-26Fixed a valgrind warning in BlockDirt.madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1011 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-25Fixed up a few valgrind warningsmadmaxoft@gmail.com1-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
2012-10-21Top blocks are now snowed over, either normally, or in deep snow (patch contributed by funmaker, Luksor and Sebi)madmaxoft@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1000 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-21Added jukeboxes (patch contributed by Luksor)madmaxoft@gmail.com1-2/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@994 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-20Made cWorld's block query functions more orthogonal, added GetBlockInfo() returning all info on a block.madmaxoft@gmail.com1-0/+18
git-svn-id: http://mc-server.googlecode.com/svn/trunk@986 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-15Fixed DelayedFluidSimulator.madmaxoft@gmail.com1-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
2012-10-14Floody fluid sim: reads params from world.ini; water and lava react together into cobblestone / stone / obsidianmadmaxoft@gmail.com1-5/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@965 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-14Initial Floody fluid simulator.madmaxoft@gmail.com1-13/+13
Can spread, cannot dry. git-svn-id: http://mc-server.googlecode.com/svn/trunk@963 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-13Preparation for multiple fluid simulators.madmaxoft@gmail.com1-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
2012-10-13Added delayed ticking to Lua APImadmaxoft@gmail.com1-24/+41
git-svn-id: http://mc-server.googlecode.com/svn/trunk@953 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-10Added an option to disable/enable PVP on a per world basisfaketruth1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@944 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-06Completely removed the old (buggy) redstone simulator.madmaxoft@gmail.com1-10/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@937 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-06BlockArea writing support (BlockTypes with BlockMeta only)madmaxoft@gmail.com1-0/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@933 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03Fixed saplings not growing into treesmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@924 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-10-03Moved blockticking into blockhandler classes.madmaxoft@gmail.com1-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
2012-09-29Beds can be slept in now (it doesn't change the time though)faketruth1-0/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@911 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-29Unified folder name-casingmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@902 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-25Added the block dig animation packet (patch contributed by l0udPL)madmaxoft@gmail.com1-0/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@892 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-18/+18
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: OSSupport-related files in a separate subfolder, renamed.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@885 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: Removed unused cBlockToPickupmadmaxoft@gmail.com1-1/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@884 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: Mobs-related files in a separate subfolder, renamed.madmaxoft@gmail.com1-16/+19
git-svn-id: http://mc-server.googlecode.com/svn/trunk@883 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: Generating-related files in a separate subfoldermadmaxoft@gmail.com1-2/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@881 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-11Merged in a patch for sounds by l0udPLmadmaxoft@gmail.com1-0/+9
http://forum.mc-server.org/showthread.php?tid=434&pid=4564#pid4564 git-svn-id: http://mc-server.googlecode.com/svn/trunk@858 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-02Next iteration on the 1.3.2 protocol. Still no good, but sometimes it just gets through. For your testing pleasures ;)madmaxoft@gmail.com1-9/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@819 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-01Added a Player parameter to OnUpdatedSign and OnUpdatingSign Lua callbacks and to the cWorld:UpdateSign method (http://forum.mc-server.org/showthread.php?tid=464&pid=4393#pid4393)madmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@814 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-31Progress on the 1.3.2 protocol.madmaxoft@gmail.com1-2/+2
Sometimes the client lets the player through, but most of the times the connection breaks for no apparent reason. git-svn-id: http://mc-server.googlecode.com/svn/trunk@812 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-29Gotten completely rid of all cPackets. The cProtocol125 class now does all the parsing and writing by itself.madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@802 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-27Cut out all packet handling to a separate cProtocol descendantmadmaxoft@gmail.com1-36/+19
git-svn-id: http://mc-server.googlecode.com/svn/trunk@796 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-26git-svn-id: http://mc-server.googlecode.com/svn/trunk@795 0a769ca7-a7f5-676a-18bf-c427514a06d6madmaxoft@gmail.com1-0/+9
2012-08-25cWorld doesn't use cPackets.madmaxoft@gmail.com1-40/+70
git-svn-id: http://mc-server.googlecode.com/svn/trunk@789 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-24cPickup doesn't use cPackets.madmaxoft@gmail.com1-0/+9
Also, Lua API change, OnCollectItem -> OnCollectPickup; first param is cPlayer to match other callbacks. git-svn-id: http://mc-server.googlecode.com/svn/trunk@786 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-24Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets.madmaxoft@gmail.com1-4/+31
git-svn-id: http://mc-server.googlecode.com/svn/trunk@783 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-23Added a RateCompareString function to StringUtilsfaketruth1-0/+36
Created a preprocessor template (define) for DoWith* functions Exported cWorld::FindAndDoWithPlayer(), cRoot::FindAndDoWithPlayer() and cRoot::ForEachPlayer() to Lua Added a function FindAndDoWithPlayer to cRoot and cWorld. It takes a part of a player name and finds a single player based on that. Fixed Core's MOTD to contain the correct URL to the MCServer site Fixed Core /kick command Fixed Core's WebAdmin kick git-svn-id: http://mc-server.googlecode.com/svn/trunk@779 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Window, Chest, Furnace and Pawn are not using cPackets at allmadmaxoft@gmail.com1-0/+18
git-svn-id: http://mc-server.googlecode.com/svn/trunk@762 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Almost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle.madmaxoft@gmail.com1-3/+74
git-svn-id: http://mc-server.googlecode.com/svn/trunk@761 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-19Another handful of packets rewritten.madmaxoft@gmail.com1-0/+18
Also changed cItem::m_ItemID into m_ItemType of type short. Easier handling. m_ItemID kept for compatibility reasons (Lua-interface etc.) git-svn-id: http://mc-server.googlecode.com/svn/trunk@756 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-18Chat packet handled in the new way; fixed missing packet sending for inventory slot.madmaxoft@gmail.com1-1/+19
Again, API change! cPlugin:OnChat() has had its parameters swapped, to match all the other callbacks - Player first, Message second git-svn-id: http://mc-server.googlecode.com/svn/trunk@751 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-15Added a true "all chunks saved" message for the save-all console command (FS #215)madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@738 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-03Fixed a few gcc pedantic warnings; made BLOCKTYPE an unsigned char type.madmaxoft@gmail.com1-8/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@711 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-15A new Block handling system :olapayo94@gmail.com1-83/+56
It was really a lot of work :D Took me the complete weekend :D Would really like to here your opinion on this =) The aim of this is to put all the actions for one block in one place so it is not spread around the source. (ToPickup, Action in cWorld, Action in cChunk, Action here, action there :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@671 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-15World threads are stopped before the plugin mgr for clean exit (FS #228)madmaxoft@gmail.com1-3/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@669 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-15Basic jungle trees with vines, efficient trees handling.madmaxoft@gmail.com1-10/+13
git-svn-id: http://mc-server.googlecode.com/svn/trunk@665 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-13Fixed case comparison - used the builtin functionmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@663 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-13fixed /tp commandlapayo94@gmail.com1-1/+1
made cWorld::DoWithPlayer case insensitive git-svn-id: http://mc-server.googlecode.com/svn/trunk@662 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02cBlockArea object added (with only minimal testing so far)madmaxoft@gmail.com1-2/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@641 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-07-02Added the cWorld::DoWithPlayer() function and exported it in the Lua API. Removed the obsolete cWorld::GetPlayer() function.madmaxoft@gmail.com1-47/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@639 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-19Made ForEach API safer to use, now supports Destroy()-ing objects, too ( http://forum.mc-server.org/showthread.php?tid=434&pid=3513#pid3513 )madmaxoft@gmail.com1-2/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@633 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-17Removed the deprecated GetBlockEntity(), added several enumerators to replace it.madmaxoft@gmail.com1-10/+45
git-svn-id: http://mc-server.googlecode.com/svn/trunk@629 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-17Logs completion of chunk saving (FS #215)cedeel@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@628 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-16Added new hooks: UPDATING_SIGN and UPDATED_SIGN. The first one is capable of changing the sign text by returning the new four lines along with the bool valuemadmaxoft@gmail.com1-4/+13
git-svn-id: http://mc-server.googlecode.com/svn/trunk@622 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-16Exported cWorld::ForEachEntity and cWorld::ForEachEntityInChunk; no idea if they actually workmadmaxoft@gmail.com1-7/+33
git-svn-id: http://mc-server.googlecode.com/svn/trunk@620 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-15Only spawn nether mobs in nether biome.cedeel@gmail.com1-20/+26
git-svn-id: http://mc-server.googlecode.com/svn/trunk@613 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Renamed HOOK_WEATHER_CHANGE to HOOK_WEATHER_CHANGED, added the glue code for it to actually workmadmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@610 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-1845/+1845
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Added HOOK_WEATHER_CHANGE.cedeel@gmail.com1-0/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@605 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-13Revamped the weather system.cedeel@gmail.com1-28/+69
git-svn-id: http://mc-server.googlecode.com/svn/trunk@599 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09Fixed a forgotten ini file readmadmaxoft@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@590 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09More ini settings save their defaultsmadmaxoft@gmail.com1-5/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@588 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09New IniFile functionality: read value and set default if it isn't present (GetValueSet() ); used by cWorldmadmaxoft@gmail.com1-29/+20
git-svn-id: http://mc-server.googlecode.com/svn/trunk@586 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09Sugarcane and cactus max height can be set in world.ini.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@585 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09Plants growable by bonemeal are settable in the world.ini. Default matches vanilla MC.madmaxoft@gmail.com1-8/+67
git-svn-id: http://mc-server.googlecode.com/svn/trunk@584 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09Cacti grow by themselves and by bonemealmadmaxoft@gmail.com1-0/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@583 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09Bonemeal is consumed in survival mode when used on growable blocksmadmaxoft@gmail.com1-6/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@582 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-08Sugarcane grows and can be grown using bonemeal.madmaxoft@gmail.com1-0/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@578 0a769ca7-a7f5-676a-18bf-c427514a06d6
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/+88
git-svn-id: http://mc-server.googlecode.com/svn/trunk@573 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-07Repeaters' delays can be set by rclkmadmaxoft@gmail.com1-0/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@570 0a769ca7-a7f5-676a-18bf-c427514a06d6
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-7/+44
git-svn-id: http://mc-server.googlecode.com/svn/trunk@561 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-30Added support for SetNextBlockTick() function callable from Luamadmaxoft@gmail.com1-0/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@527 0a769ca7-a7f5-676a-18bf-c427514a06d6
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-21/+75
git-svn-id: http://mc-server.googlecode.com/svn/trunk@518 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-05-25Merged the composable_generator branch into the trunkmadmaxoft@gmail.com1-234/+258
git-svn-id: http://mc-server.googlecode.com/svn/trunk@504 0a769ca7-a7f5-676a-18bf-c427514a06d6
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/+12
git-svn-id: http://mc-server.googlecode.com/svn/trunk@454 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24Reverted the previous commit - it is useless, since entities still depend heavily on cWorldmadmaxoft@gmail.com1-98/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@428 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-23Encapsulated cWorld functions needed in cWorldStorage into an interface, so that cWorldStorage can actually be used outside of MC-Server (such as storage conversion tools and chunk analyzers)madmaxoft@gmail.com1-0/+98
git-svn-id: http://mc-server.googlecode.com/svn/trunk@427 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-22Fixed a deadlock by removing clients from all chunks upon their exit, not using the clients chunklists.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@426 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-16Exposed a function to Lua to get a block's sky light valuefaketruth1-0/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@416 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-14Unified the chunk data to use the BLOCKDATA datatype.madmaxoft@gmail.com1-0/+15
git-svn-id: http://mc-server.googlecode.com/svn/trunk@413 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-14Split chunk data into separate arrays; decoupled most sources from cChunk.h dependencymadmaxoft@gmail.com1-9/+27
git-svn-id: http://mc-server.googlecode.com/svn/trunk@411 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-12Added a flat terrain generator with settable terrain heightmadmaxoft@gmail.com1-2/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@404 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-11Stopping the ChunkSender upon server stopmadmaxoft@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@401 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10Fixed a few obsoleted functionsmadmaxoft@gmail.com1-23/+28
git-svn-id: http://mc-server.googlecode.com/svn/trunk@397 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10Fixed *nix threading issue;madmaxoft@gmail.com1-1/+1
Thread objects now use variable names consistent with MCS convention; Fixed a few *nix threading cornercases git-svn-id: http://mc-server.googlecode.com/svn/trunk@392 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-09cClientHandles have a unique ID now to distinguish themfaketruth1-2/+2
cAuthenticator uses unique client ID for authentication Changed the kick function used by cAuthenticator to take a client ID instead of name, so the correct user is kicked Using callback reference instead of pointer in GetChunkData and affiliates GetChunkData returns false when failed, and true when succeeded Renamed entity type enums to something prettier Exposed some functions to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@388 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-07Fixed bug where cPlayer's cClientHandle was used after cPlayer was destroyed http://forum.mc-server.org/showthread.php?tid=380faketruth1-32/+44
Also removed the SetClientHandle() function from cPlayer Added a Destroyed() function to cEntity that is called ONLY ONCE after an entity has been 'destroyed' Cleaned up some code, using enums for GameMode and Weather and replaced some 'const char *' with 'const AString &' Exposed some more functions to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@382 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06That was not a good place to use ARRAYCOUNT()madmaxoft@gmail.com1-5/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@372 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06Fixed rev368's ChunkSender, now sends properly even chunks that are loaded. Fixed a deadlock in cClientHandle vs TickThread over cClientHandle::m_CSChunkListsmadmaxoft@gmail.com1-0/+18
git-svn-id: http://mc-server.googlecode.com/svn/trunk@371 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-06Fixed bug FS#157 http://mc-server.org/support/index.php?do=details&task_id=157faketruth1-5/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@370 0a769ca7-a7f5-676a-18bf-c427514a06d6
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-9/+13
git-svn-id: http://mc-server.googlecode.com/svn/trunk@365 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-03Got rid of some hardcoded numbers, now using hardcoded variables! woofaketruth1-6/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@355 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-01New redstone simulator. Should work without crashes!faketruth1-0/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@345 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-29Fixed the authenticator bugmadmaxoft@gmail.com1-0/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@344 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-29Added validity checks to world broadcasting. Also added logging to cPlayer deletion to catch that stupid BugByBoo.madmaxoft@gmail.com1-3/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@342 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28Chunk now has an indicator of load failure; Chunk generator uses cChunkStaymadmaxoft@gmail.com1-0/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@337 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28Implemented synchronous chunk loading; optimized cChunkStay interface for speed (though still unused ;)madmaxoft@gmail.com1-2/+20
git-svn-id: http://mc-server.googlecode.com/svn/trunk@336 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-28Const-correctness for packet broadcasting (fixes GCC compilation)madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@333 0a769ca7-a7f5-676a-18bf-c427514a06d6
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/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@330 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-22Added a crude way of disabling redstone. It's necessary though, redstone is completely broken, crashes the server all the timefaketruth1-22/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@312 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-21Removed cChunkPtrs from everywhere but internal cChunkMap usage. Now we should finally be threadsafe :)madmaxoft@gmail.com1-74/+35
Also fixed a threading issue when a player connecting might have gotten stuck in "Downloading world" forever git-svn-id: http://mc-server.googlecode.com/svn/trunk@304 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-21Fixed heightmap optimization from rev 302; removed a few more cChunkPtrsmadmaxoft@gmail.com1-0/+27
git-svn-id: http://mc-server.googlecode.com/svn/trunk@303 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-21Fixed block-getting so that simulators work againmadmaxoft@gmail.com1-16/+26
git-svn-id: http://mc-server.googlecode.com/svn/trunk@301 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-20Removed some more cChunkPtr usagemadmaxoft@gmail.com1-14/+53
git-svn-id: http://mc-server.googlecode.com/svn/trunk@298 0a769ca7-a7f5-676a-18bf-c427514a06d6
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-20/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@295 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18Fixed previous commit: forgot to remove a debugging settingmadmaxoft@gmail.com1-3/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@294 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18Re-implemented tree-growing. May produce artefacts on old-world / new-world boundaries.madmaxoft@gmail.com1-11/+32
git-svn-id: http://mc-server.googlecode.com/svn/trunk@293 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18Thread-safe chunk generation, storage and generator are queried for progress while initializing servermadmaxoft@gmail.com1-40/+108
Note that this commit breaks foliage generation - there are no trees in the chunks generated! git-svn-id: http://mc-server.googlecode.com/svn/trunk@292 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-17Chunk coords mostly "upgraded" to include the Y coord for future compatibilitymadmaxoft@gmail.com1-0/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@285 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-17Removed useless log messagesmadmaxoft@gmail.com1-1/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@284 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16git-svn-id: http://mc-server.googlecode.com/svn/trunk@281 0a769ca7-a7f5-676a-18bf-c427514a06d6faketruth1-2/+2
2012-02-16cWorldGenerator speedup - doesn't call GetChunk() anymore, not queueing the chunk it's generating to be loaded recursively.madmaxoft@gmail.com1-0/+9
cChunk fix - setting a block to the same value doesn't mark chunk dirty (resulted in un-unloadable chunks) git-svn-id: http://mc-server.googlecode.com/svn/trunk@279 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16Got rid of dangerous GetEntity(), not using DoWithEntity()faketruth1-5/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@278 0a769ca7-a7f5-676a-18bf-c427514a06d6
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-1/+72
git-svn-id: http://mc-server.googlecode.com/svn/trunk@273 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15Fixed logging formatting error in cWorldmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@264 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14Got rid of cWorld::GetAllPlayers() and implemented ForEachPlayer() more or less in Luafaketruth1-20/+0
Core now uses ForEachPlayer() to interact with connected players git-svn-id: http://mc-server.googlecode.com/svn/trunk@260 0a769ca7-a7f5-676a-18bf-c427514a06d6
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-451/+404
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-08Added total chunk count to webadminmadmaxoft@gmail.com1-2/+108
git-svn-id: http://mc-server.googlecode.com/svn/trunk@248 0a769ca7-a7f5-676a-18bf-c427514a06d6
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-42/+82
git-svn-id: http://mc-server.googlecode.com/svn/trunk@245 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01Rewritten cAuthenticator to make use of the new cIsThread architecture - now authentication runs in a single separate thread for all clients;madmaxoft@gmail.com1-0/+4
Global player-kicking function (cServer, cRoot); More char * -> AString conversion git-svn-id: http://mc-server.googlecode.com/svn/trunk@221 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29Old code begone! ChunkMap cleanupmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@189 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-5/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-19Terrain generation is synchronous again, async generation has bugs.faketruth1-27/+29
Made some funky smart pointer things for chunks. Fixed a bug where the client would override the player position on the server and back again, resulting in sending too many chunks to the client which it doesn't even need. Fixed some compiler warnings in cPickup.cpp git-svn-id: http://mc-server.googlecode.com/svn/trunk@164 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-01Fixed the numchunks console command.faketruth1-1/+15
Added some form of reference counting to cChunk to make sure it's not referenced when deleting it. Right now it's only needed due to the generation of chunks in a separate thread and adding it to the spread light list in cWorld git-svn-id: http://mc-server.googlecode.com/svn/trunk@161 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-31Made a couple of functions in cChunk inline, this should speed up several block operations on chunksfaketruth1-2/+2
Players should not spawn in the ground anymore. When an entity was added to cWorld twice (which shouldn't happen actually), the server would crash when the entity is destroyed, this should be fixed now. git-svn-id: http://mc-server.googlecode.com/svn/trunk@158 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28- implemented the fire simulation in native c++ (cFireSimulator)lapayo94@gmail.com1-5/+12
- Changed the Durationsystem for Items. cPlayer::UseEquippedItem calls cItem::DamageItem this function damages the item if it has a duration. (needed the duration also in another place so this saves code ;)) - added some other burning blocks - the mobtypes for the settings.ini which i must have forgotten in the last commit git-svn-id: http://mc-server.googlecode.com/svn/trunk@150 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28Fixed some small memory leakslapayo94@gmail.com1-0/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@148 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-27Users file was pretty messed up with mixed unix and windows line endings. The ini failed to parse correctly under cygwin.faketruth1-1/+8
'Fixed' a 'bug' where MCServer would seemingly endlessly calculate lighting for an entire world (and then crash), when this entire world has 'wrong' lighting. This happens when running a converted map from Vanilla. Fixed this by only allowing a maximum of 50 chunks to recalculate their lighting per tick. Fixed a small coding error in cChunkMap where it would check PakVersion twice, instead of also ChunkVersion. DeNotch converter does not need the VS2010 runtime thingies anymore git-svn-id: http://mc-server.googlecode.com/svn/trunk@138 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-27Some kind of 'template' world generator that right now just generates an all dirt world. You can use this to test new algorithmsfaketruth1-8/+14
git-svn-id: http://mc-server.googlecode.com/svn/trunk@127 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26- improved Simulator system lapayo94@gmail.com1-8/+22
-> Manager handles all ticks -> advantage: Much easier to add new simulators, because you only have to register them in the manager - moved sand and gravel simulation to a Simulator-class (cSandSimulator) - Made Squid a little bit more funny and realistic, because it dies now when it´s not in water -Escaping mobs run now faster than normal (They just walked away before :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@125 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26 - Linux compatible fixes including updated makefilemtilden@gmail.com1-14/+18
- Mersenne Twister still says uint32 but it's now signed for compatibility with random uses needing negative values - Server seed is sent to clients, but needs to be able to be signed long long later on for authentic reasons - Protocol Version is required to match to ensure client compatibility, this should probably have a settings.ini check as well as store the value there git-svn-id: http://mc-server.googlecode.com/svn/trunk@121 0a769ca7-a7f5-676a-18bf-c427514a06d6
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-50/+120
Chunks are now generated before the player is able to see them. This is done because after a chunks is done generating, some blocks might still need to be set (parts of trees from neighboring chunk), causing more bandwidth to be used (each changed block needs to be sent to clients again) and (fps) lagging the clients when changing a lot of blocks. Calculating ahead fixes these issues. Separated the placing of foliage (trees and stuff) when generated chunks into a new function GenerateFoliage() Cleaned up the VS2010 project, now using some VS2010 specific functions like dependencies on projects (no need for setting library dependencies manually). VS2010 project now compiles way faster in Release by using multi threading. git-svn-id: http://mc-server.googlecode.com/svn/trunk@103 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-24Max. players and MOTD are now changeable in the settings.inilapayo94@gmail.com1-0/+21
Thanks to mtilden ( http://forum.mc-server.org/showthread.php?tid=183&pid=1381#pid1381 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@101 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-22Digging leaves with shears now drops leaveslapayo94@gmail.com1-5/+5
Falling Sand now notifies water around Implemented Function to get the relative chunk position in the total position (cChunk::PositionToWorldPosition) Pistons don´t drop water and lava items anymore when stopping water/lava implemented Getter for lava and water simulator IsBlockWater and IsBlockLava function in Defines.h git-svn-id: http://mc-server.googlecode.com/svn/trunk@97 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-10Added code for doors. Doors now place correctly but opening them is buggy and I need to change the current opening code to use bitwise operators.admin@omencraft.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@85 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-10Storms were WAY too frequent. I toned them down.admin@omencraft.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@84 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-10Added random weather that persists per world. Also added SetWeather, GetWeather, and CastThunderbolt to lua bindings.admin@omencraft.com1-0/+71
git-svn-id: http://mc-server.googlecode.com/svn/trunk@83 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-09bugfix to redstone, it can climb walls again.admin@omencraft.com1-5/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@81 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-09Redstone clocks now work. even one clocks. torches don't update themselves when placed yet, but redstone wire updates the torch. Fixed a bug with piston animations.admin@omencraft.com1-0/+35
git-svn-id: http://mc-server.googlecode.com/svn/trunk@80 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-08Fixed world timefaketruth1-1/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@78 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-07Added Sebi's changes to pistons and item drops.admin@omencraft.com1-0/+38
git-svn-id: http://mc-server.googlecode.com/svn/trunk@72 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-06Patch with diff file created by Sebi (implemented some stuff like lava physics, drops are deleted when in lava, water is now slower, lava gives actual damage etc.). Pistons now work mostly as they should. They do not yet show the motion animation and do not emit sound. They do extend, push, and retract as they should though. Right now the only way to activate a piston is to light redstone wire adjacent to it with a redstone torch.admin@omencraft.com1-3/+15
git-svn-id: http://mc-server.googlecode.com/svn/trunk@67 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-02Fixed some "Entity was not found in any chunk!" warningsfaketruth1-0/+1
Player's current world is saved in the player file. When a player joins the server, the player joins the last world he was in. It seems MCServer can finally run multiple worlds! It just needs functionality to switch between them git-svn-id: http://mc-server.googlecode.com/svn/trunk@46 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-02Changed world gamemode location to world.ini for world based gamemodes.admin@omencraft.com1-2/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@43 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-01fixed player spawning in the ground.admin@omencraft.com1-5/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@42 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-01You can now run multiple worlds by defining them in settings.ini . However there's no way to change worlds on the fly yetfaketruth1-36/+32
Players are now stored in separate folder /players instead of in the world folder (!so move the folder!) Fixed a memory leak/error in cPickup.cpp Multiple worlds are stored in cRoot cClientHandle lists are taken out of cWorld and now stored in cServer Worlds now have names to distinguish them by Some functions in the Core plugin now distinguish between worlds git-svn-id: http://mc-server.googlecode.com/svn/trunk@40 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@29 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-26Made several recomended changes. Gamemode is now world based. Need to add it to player.admin@omencraft.com1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@18 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-26Updated VS2010 project filesfaketruth1-104/+43
Made monster spawning code in cWorld.cpp a bit more compact and readable srand() is only supposed to be called once in the whole program, and it's already called in the constructor of cWorld so it doesn't have to be in cWorld::Tick() git-svn-id: http://mc-server.googlecode.com/svn/trunk@14 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-26git-svn-id: http://mc-server.googlecode.com/svn/trunk@10 0a769ca7-a7f5-676a-18bf-c427514a06d6admin@omencraft.com1-10/+120
2011-10-03MCServer c++ source filesfaketruth1-0/+764
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6